LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peak points in a complex array

hello

 

I am having a 2D array of complex numbers. I intend to find the peak points in the array. For that i find the average value of the array elements. I subtract the array elements with tthis average value. Values with positive values refer to peaks. My question is how is it possible to sort out the COMPLEX numbers which are greater than zero?? In case of real numbers it is an easy task.

 

Example :

 

2

6           >>>>> Average value = [(2)+(6) +(4)]/3 = 4

5

 

Finding peak points >>>> (2) - 4 = -2

                                           (6) - 4 = 2                  Points greater than zero are considered as peaks. So 2 & 1 are peak points here

                                            (5)-4 = 1

 

 Similarly how can we find it for complex number?  After subtracting from the average value, how can we differentiate it whether greater than zero or not??

 

For example for these points? (2+4i),(6+2i) ,(4+3i)

See attached VI

 

Thankss 

 

Message Edited by Nghtcrwlr on 03-13-2009 08:02 AM
Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 18
(4,488 Views)
This seems to be a derivative question of this question. The same concepts apply here. You need the magnitude of the complex numbers. I have no idea what you're doing in your VI.
Message 2 of 18
(4,451 Views)

The magnitude is never <0, but if you subtract from the average magnitude, you can pick the elements that result in a negative value.

Message Edited by altenbach on 03-13-2009 08:27 AM
Message 3 of 18
(4,444 Views)

Hello ALtenbach

From the complex number 2D Array, i splitte dthem in to Magnitude and phase and I took the average magnitude and subtacted it from the magnitude  2D array. Now i need to find out positve values of magnitude from it and then the complex numbers in the original 2D Array corresponding to these positive values.

 

any ideas?

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 18
(4,415 Views)

See the attachment below... I have done  till subtracting from the avg value. now i need to get the positve magnitude values and then those values corresponding to this positive r in the original complex number

 

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 18
(4,399 Views)

Nghtcrwlr wrote:

now i need to get the positve magnitude values and then those values corresponding to this positive r in the original complex number


Well, you still need to specify how you want the output. You cannot delete individual elements from a 2D array, of course. You could:

  1. Create a 1D array of the matching elements
  2. Keep it a 2D array, but zero all short values
  3. ...

So please tell us. In any case, you are still using way too much code. Here's the equivalent code of "peak test 1.vi"  with much less clutter. You don't need a FOR loop and there is a primitive to take the product of all dimensions.

 

Message Edited by altenbach on 03-16-2009 08:43 AM
0 Kudos
Message 6 of 18
(4,380 Views)

Hello ALtenbach..

 

I want to keep it as a 2D array, and zero all short values. But i need the output as complex number., i mean the final output.

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 18
(4,369 Views)

Try something like this:

 

 

Makes sense? 😉

Message Edited by altenbach on 03-16-2009 09:40 AM
0 Kudos
Message 8 of 18
(4,361 Views)

Hey Nghtcrwlr,

 

unfortunately I don't understand what output you need. Can you give an exact example, so i can try it in LabVIEW?

 

Thanks,

cheggers

Sascha
0 Kudos
Message 9 of 18
(4,351 Views)

Hello Altenbach

 

It wrkd... by the method u suggested am getting the result. But i think I do not need that zeros... so hw can i get the values only as 1D array?

 

thanx

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 10 of 18
(4,332 Views)