LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

translate an array "y(i)=x(i-n)"

Hey,
I'm looking for a VI which can translate a 1D array like this : "y(i)=x(i-n)".
I think I have already seen one which does that but I can't find it anymore.
can someone help me??

0 Kudos
Message 1 of 5
(3,001 Views)

I did not understand the exact translation you want to achieve, but I suggest you check out the primitives in the array palette (e.g. Reverse, Rotate).

If that doesn't help, can you show an example of a source and result array.


___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(2,987 Views)
I'm making a VI that displays 3 beats of electrocardiogram in different graphes,  and I want to align them, so I've done the cross correlation between the different signals, and then I want to shift them. since my samples are in a 1D array, I'm looking for a VI that can do this shift
0 Kudos
Message 3 of 5
(2,985 Views)
If I understand your need correctly, you can just use the "Rotate 1D Array" function from the array palette.

Hope this helps,
Daniel
0 Kudos
Message 4 of 5
(2,978 Views)
Rotate array is probably not quite what you want because it will wrap around.
 
You can just use a quick loop to re-index.
 
In the more general case where N can contain a fractional part, you can use "interpolate array" in a similar way and e.g. shift the array by 5.5 positions. 
0 Kudos
Message 5 of 5
(2,964 Views)