Rotate 1D Array Function
- Updated2025-07-30
- 2 minute(s) read
Rotates the elements of array the number of places and in the direction indicated by n.
The connector pane displays the default data types for this polymorphic function.

Inputs/Outputs
n
—
n must be a numeric data type. The function coerces n to a 32-bit integer if you wire another representation to it.
array
—
array can be a 1D array of any type.
array (last n elements first)
—
array (last n elements first) is the output array. For example, if n is 1, the input array[0] becomes output array[1], input array[1] becomes output array[2], and so on, and input array[m–1] becomes output array[0], where m is the number of elements in the array. If n is –2, input array[0] becomes output array[m–2], input array[1] becomes output array[m–1], and so on, and input array[m–1] becomes output array[m–3], where m is the number of elements in the array. |
FPGA Module Details
The following details apply when you use this object in an FPGA VI.
Note The following details are subject to change with each version of the LabVIEW FPGA Module.
| Single-Cycle Timed Loop | Not Supported. |
| Usage | If you wire a constant directly to the n input, this function is purely a wiring operation. Otherwise, this function implements an iterative algorithm, rotating the elements by one position each clock cycle. |
| Timing | If n is a constant, this operation requires no clock cycles. Otherwise, this operation takes n clock cycles to execute, plus three clock cycles of overhead. |
| Resources | If you wire a constant directly to the n input, this operation consumes no FPGA resources. Otherwise, this operation consumes FPGA resources in proportion to the size of the array. |
n
—
array
—
array (last n elements first)
—