Jump to content

Rotate 1D Array function: Difference between revisions

From LabVIEW Wiki
Add new page (stub)
 
Add content
Line 1: Line 1:
{{stub}}
[[File:Rotate 1D Array - Terminals.png|thumb|Rotate 1D Array function]]
[[File:Rotate 1D Array - Terminals.png|thumb|Rotate 1D Array function]]


{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function}}
{{LabVIEW Palette Object Information|palette=Functions Palette/Programming/Array{{!}}Array palette|type=function}}
The '''Rotate 1D Array''' function takes a one-dimensional array and moves the start of the array by the number of elements specified, effectively "rotating" the array.


== Usage ==
== Usage ==


== Best practice ==
Connect a one-dimensional array at the '''array''' input terminal and specify the number of elements to move at '''n'''. The resulting array will contain all elements from the source array "rotated" by the number of elements specified.
 
[[File:Rotate 1D Array - Rotate Right.png]]
 
It is also possible to specify a negative value for '''n''' to "rotate" in the opposite direction.


== History ==
[[File:Rotate 1D Array - Rotate Left.png]]


== See also ==
A value of zero results in a <u>[[Wikipedia:NOP_(code)|no-op]]</u> which leaves the original array unchanged.


== External links ==
[[File:Rotate 1D Array - No-op.png]]


[[Category:Array Palette]]
[[Category:Array Palette]]

Revision as of 17:56, 18 November 2019

Rotate 1D Array function
Object information
Owning palette(s) Array palette
Type Function
Requires Basic Development Environment

The Rotate 1D Array function takes a one-dimensional array and moves the start of the array by the number of elements specified, effectively "rotating" the array.

Usage

Connect a one-dimensional array at the array input terminal and specify the number of elements to move at n. The resulting array will contain all elements from the source array "rotated" by the number of elements specified.

It is also possible to specify a negative value for n to "rotate" in the opposite direction.

A value of zero results in a no-op which leaves the original array unchanged.