Example Code

Rotate 2D array 90 degrees

Code and Documents

Attachment

概述

This simple VI accomplishes a 90-degree clockwise or counter-clockwise rotation of a 2D array. 

说明

Currently, there no function to accomplish a 90-degree rotation clockwise or counter-clockwise of a 2D array . So we use the "Transpose 2D Array" and "Reverse 1D Array" functions together to achieve this function.

And change the direction of rotation by changing the order of "Transpose 2D Array" and "Reverse 1D Array". 

硬件和软件要求

LabVIEW NXG 1.0 or compatible 

实现或执行代码所需的步骤

1. Select the direction of rotating, clockwise or counter-clockwise.
2. Run the VI.
3. Confirm the result.
4. Click stop to stop the VI.

其他信息或参考

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors