LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare two arrays

I want to implement a "match filter".  I have a refrence frequency spectrum represented by an 1x440 array and I have a sensor that is producing 1x440 frequency spectrum arrays.  I want to build a vi that will have both of the arrays as input and output a value that indicates how closely the signals match. 
 
Thanks
0 Kudos
Message 1 of 3
(2,920 Views)
So how exactly do you need to compare the arrays?

If you're simply looking for the difference between the cooresponding elements in the arrays, just wire both of them into a "minus" function and and it will automatically subtract each element and produce an array of the differences.



Most of the functions in LabVIEW can take an array directly and opeate on the entire array.

If this doesn't  help, can you provide some more details on how you need to compare them.

Ed

Message Edited by Ed Dickens on 02-02-2006 10:52 PM



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 3
(2,910 Views)
Hello CGA2000,

maybe you could also use the CrossCorrelation (from signal analysis -> time-domain, not in LV base package) to "compare" your two signals.
The cross correlation will give you a result of "how closely the signals match".

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,896 Views)