# Matrix Operations With Arrays In Labview

Rating: 4

7294

## Matrix Operations

We use the matrix data type to make modeling of math problems easier. Matrices group rows or columns of real or complex scalar data for some math operations, such as linear algebra operations. A TWO-DIMENSIONAL ARRAY is similar to a matrix.

If you would like to Enrich your career with an Android certified professional, then visit Mindmajix - A Global online training platform: “LabVIEW training” Course.This course will help you to achieve excellence in this domain.

## Converting an ARRAY to a Matrix:

You can convert a ONE-DIMENSIONAL or two-dimensional 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.

Step 1: Place a one-dimensional or two-dimensional array of floating-point values on the FRONT PANEL.
Step 2: Place the Array To Matrix function on the BLOCK DIAGRAM.
Step 3: Wire the array to the Array To Matrix function.
Step 4: Right-click the Array To Matrix function and select Create» Indicator from the shortcut menu to create a matrix indicator.
Step 5: Run the VI. The matrix indicator displays the contents of the original array as shown the below Figure. If you wire a one-dimensional 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. ## Converting a Matrix to an Array:

You can convert a matrix to a two-dimensional array and use array functions to manipulate the matrix values.
Complete the following steps to convert a matrix to a two-dimensional array.
Step 1: Place a Real Matrix or Complex Matrix control on the front panel.
Step 2: Place the Matrix To Array function on the block diagram.
Step 3: Wire a matrix to the Matrix To Array function.
Step 4: Right-click the Matrix To Array function and select Create»Indicator from the shortcut menu to create a two-dimensional array indicator.
Step 5: Run the VI from the front panel. The array indicator displays the contents of the array as shown in below Figure. You can store a matrix of a single row or column in a one-dimensional array. However, LABVIEW cannot determine the dimensions of a matrix until runtime. The Matrix To Array function returns has the same element type, real or complex, as the matrix you wired to the Matrix To Array function.

Check Out LabVIEW Tutorials  Course Schedule
NameDates
LabVIEW TrainingFeb 11 to Feb 26
LabVIEW TrainingFeb 14 to Mar 01
LabVIEW TrainingFeb 18 to Mar 05
LabVIEW TrainingFeb 21 to Mar 08
Last updated: 08 February 2023  