LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To convert 2D Array of double complex to 2D Array of double 64 bit real

Solved!
Go to solution

Hello

 

I am having a 2D array of double complex numbers which i have to plot an intensity graph. Now i create property node to scale the Z scale with the maximum and minum range. See the attached VI. There is a clash between the type .... how ist possibel to convert them?

 

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 9
(6,693 Views)

Under Numeric->Complex you have Complex to Re/Im

I think it'll solve your problem

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 9
(6,678 Views)

Hello Yamaeda

Actually what i needed was to get the magnitude of the complex number to be plotted.

So changing it to re/im wont work.

is there any other option to scale the graph?

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 9
(6,655 Views)
You don't need another option. If you just want to plot the magnitude then pipe your complex value into the Complex to Polar function. This will give you magnitude and phase. Magnitude is a 2D array. To get the min/max of the values for your Z-scale simply wire it to the Array Min/Max function.
Message 4 of 9
(6,642 Views)
Solution
Accepted by topic author Nghtcrwlr

smercurio_fc wrote:
If you just want to plot the magnitude then pipe your complex value into the Complex to Polar function.

Since you only need the magnitude (and not the phase) use the absolute value function on the complex 2D array. It is slightly faster because it is simpler and gives the same result. 😄

 

Message Edited by altenbach on 03-04-2009 11:26 AM
Message 5 of 9
(6,636 Views)

altenbach wrote:

It is slightly faster ...


Really? Interesting. I can't say I ever benchmarked it. Is this specific to a LabVIEW version?

0 Kudos
Message 6 of 9
(6,632 Views)

I specifically studied this (and more) in detail very long ago. It certainly requires less internal code, because it does not need to calculate the output for Q. 🙂

 

(I don't know if the newest LabVIEW versions changed things, but I doubt it.)

0 Kudos
Message 7 of 9
(6,627 Views)
Actually, the two options look pretty similar in performance these days.
0 Kudos
Message 8 of 9
(6,622 Views)

Thank you evry one!! both ways wrked....

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 9
(6,609 Views)