LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polar Plot of complex numbers

Hello

 

I am having a 2D array of complex FFT values. I converted them to polar using the Complex to polar function. When i bundle these values and connect it to a polar plot vi, it shows an error like the dimensions are not correct. Can anyone help with this?

 

The screenshot is attached below:

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 9
(4,394 Views)
try inserting two build array. it may workout else post back
0 Kudos
Message 2 of 9
(4,374 Views)

Hello Mathan

 

 I tried to insert 2 Build arrays and then bundle them together and give as input to the polar plot. But it also doesnt work.

 

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 9
(4,358 Views)
Inserting 2 additional Build Arrays would be pointless. That Build Array between the for-loop and the Complex to Polar function is also pointless. The Polar Plot VI requires an array of clusters, with each cluster containing 2 elements: a magnitude and phase. This is clearly shown in the context help. Thus, you need to convert your array. It's not clear what the rest of the VI is doing, but what does the 2D array that's coming out of the loop represent?
0 Kudos
Message 4 of 9
(4,345 Views)
Yes thats what my problem is. Actually the 2D array from the loop represents the Fourier Co efficients in FOurier Spektrum.In one part , I convert those complex fourier values to Re & Im parts and then plot it Fourier spectrum. Now i need this fourier spectrum to be bilinearly interpolated in a polar plot. This what i actually need. Do you have any idea?
Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 9
(4,332 Views)
I know the output are the coefficients. However, you're passing in a 2D array, so you're performing the FFT on slices of data. Thus the output will be FFT values for each row. How is this supposed to translate into a single plot? Forget the programming. Consider this conceptually. What does your 2D input array to the loop represent?
0 Kudos
Message 6 of 9
(4,306 Views)

If you want to blindly plot all data, you could do the following:

(array size, multiply array elements, reshape array, complex to polar, bundle)

(NOTE ADDED: the code is incorrect, because you need to scale the angle from radians to degrees!)
Message Edited by altenbach on 11-18-2008 12:02 PM
0 Kudos
Message 7 of 9
(4,303 Views)

The polar plet needs degrees, so you would need to correctly scale the angle in the above code.

 

Also remember that xy graphs take complex data directly, so if you want seperate plots (e.g. different color) for each row in the data, you could do it as follows. No scaling needed.

 

Message Edited by altenbach on 11-18-2008 12:05 PM
0 Kudos
Message 8 of 9
(4,297 Views)

Hello smercurio_fc

 

A 24 bit pixmap (2D array) from an image data is performed 2D FFT. The input array is this one. I have done the 2D FFT for the whole image  by first computing the FFT for rows in parallel and then FFT for the columnsof the resulting one.Now what i want to do is to take the slices through the centre of the image at various angles (Central Slice Theorem). [For this i need to map of the samples of the FT from cartesian raster to a polar raster and I am not clear about how to do this]

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 9
(4,288 Views)