Shifts the elements in the Input Array by the specified number of shifts. Details
![]() |
Input Array is the input array to be shifted. |
![]() |
shifts: n specifies the direction and number of shifts applied to Input Array. The VI shifts Input Array to the right if shifts: n is positive and to the left if shifts: n is negative. The default is 0.
To properly shift Input Array without setting the output sequence Shifted Array to zero, the absolute value of shifts: n must be less than the number of elements in Input Array:
|shifts: n| < n.
If the absolute value of shifts: n is greater than or equal to the number of samples in Input Array, the VI sets Shifted Array to zero and returns an error. |
![]() |
Shifted Array returns the output sequence. |
![]() |
error returns any error or warning from the VI. Refer to Signal Processing Error Codes for more information about these conditions. |
Let the sequence Y represent the output sequence Shifted Array. Then the elements of Y are related to the elements of X by
for i = 0, 2, n - 1,
where n is the number of elements in Input Array.
![]() | Note The Y[i]=X[i-n] VI does not rotate the elements in the array. The Y[i]=X[i-n] VI disposes of the elements of the input sequence shifted outside the range. You cannot recover those elements by shifting the array in the opposite direction. |