Converting an Array to a Matrix
- Updated2025-08-15
- 1 minute(s) read
You can convert a 1D or 2D array of double-precision or complex numbers to a matrix and continue to use array functions to manipulate the matrix values. Complete the following steps to convert an array to a matrix.
- Add a 1D or 2D array of floating-point values to the front panel.
- Add the Array To Matrix function to the block diagram.
- Wire the array to the Array To Matrix function.
- Right-click the Array To Matrix function and select Create»Indicator from the shortcut menu to create a matrix indicator.
- Run the VI. The matrix indicator displays the contents of the original array.
If you wire a 1D array to the Array to Matrix function, the function copies the array elements to the first column of the matrix. The function converts arrays that contain complex elements to complex matrices and converts all other arrays to real matrices. LabVIEW stores matrix elements with double-precision numerical values. You also can convert a matrix to an array.