ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

differences between 2 arrays

I have 2 arrays of 4000 samples, the samples are more or less the same but in the second array they are shifted a number. How can I get this number?
For example, the two arrays could be:
 
[1 2 3 4 5 6 7]   [0.2 0.1 0.2 1.1 2.1 3 4.2 5.1 6.2 6.9 ]
 
Thanks
0 Kudos
Message 1 of 4
(3,047 Views)

if the 2 arrays are identical but "shifted", you can use the "search 1D array.

however, from your example it look they are quite different. what is the overall purpose?

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 4
(3,042 Views)
No, the arrays are not identical.
The thing is, I have 2 microphones in two diferent position of a room, I transmit a burst, and I get samples of this signal, so this samples are very similar but shifted, and I want to get this "shift"...
 
Thanks
 
 
 

 

0 Kudos
Message 3 of 4
(3,036 Views)

you might need some different function for that. i understand you look for the phase difference between the 2 signals.

in the signal processing pallette, you have the waveform measurment subpallette. browse there as well as example related.

one particular function i have in mind is the frequency response function, which will give you the phase between 2 signals.

does it help?

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 4
(3,031 Views)