Hallo,
how can I calculate the offset of two functions?
(Details: I have two 1D-arrays Y[1,...,N] and Z[1,...,N] with the N values of the two functions. I want to substract them from each other in a way that a part of the function is eliminated. My idea is the following:
sub[1,...,N]=0
for k=1 to N
for i=k to k+m (only the part [1,...,m] of Y is interesting to me and the offset i of Z)
if i<=N then sub[i]=Y[k]-Z[i] else sub[i]=0
next i
next k
I save each substration-array and select the one with the lowest sum. That index j should be the required offset.)
Note that my idea isn't programmed in LabVIEW yet, perhaps one of you has a better idea.
Arno
PS: If you attach a VI: I use LabVIEW 6.1, so please it in a way I can read it.