LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

complex sort

Solved!
Go to solution

Hi,

 

I am trying to sort a complex column in order of their individual sums. I was given code snippet by Altenbach (On top) which worked great, however I mistakenly said all my data would be real which it wasnt. So what I am trying to do is modify it for complex data. I tryed to replace sort 1d array with sort complex but I keep getting a data type mismatch. I am fairly new at this and have been stuck on this for quite a while now.

 

Any help is greatly appreciated.

 

Thanks

Nick Muir

 

Untitled.png

0 Kudos
Message 1 of 3
(2,165 Views)
Solution
Accepted by topic author Canalian

How do you sort complex data?  Which is greater 1 +0j or 0 +1j?  What you need to do is convert your complex number to a real number and feed that into your cluster that you sort.  Whether that is just taking the real part, or if that is converting it to a vector length.

Message 2 of 3
(2,161 Views)

Thanks I guess my maths is failimg me on this one.

 

Realy appreciated

0 Kudos
Message 3 of 3
(2,155 Views)