The following table shows LabVIEW data types and the corresponding data types in the MATLAB® software, Xmath software, and LabVIEW MathScript. You can change the data type of an input or output terminal on a script node.
| LabVIEW Data Type | MATLAB Language Syntax | Xmath Syntax | MathScript Syntax |
|---|---|---|---|
|
Real | Real Scalar | Scalar»DBL |
|
Complex | Complex Scalar | Scalar»CDB |
|
1-D Array of Real | Real Vector | 1D-Array»DBL 1D |
|
1-D Array of Complex | Complex Vector | 1D-Array»CDB 1D |
|
2-D Array of Real | 2-D Array of Real | Matrix»Real Matrix (2D only) |
|
2-D Array of Complex | 2-D Array of Complex | Matrix»Complex Matrix (2D only) |
|
String | String | Scalar»String |
|
Path | N/A | N/A |
|
N/A | String Array | 1D-Array»String 1D |
![]() | Note You also can use the state-space, transfer function, and zero-pole-gain models of the LabVIEW Control Design Toolkit with the MathScript Node and the Xmath script node. The Xmath software supports only the SISO versions of the transfer function model and the zero-pole-gain model, but LabVIEW MathScript supports all versions of the models. You must have the LabVIEW Control Design Toolkit installed to use these models. Refer to the LabVIEW Control Design Toolkit documentation for more information about these models. |
The MathScript Node and the MATLAB script node handle 1D array inputs only by row, and the Xmath script node handles 1D array inputs only by column. To change the orientation of a 1D array from row to column or column to row, transpose the array before you perform operations on elements of the array.
Use the Conversion VIs and functions or the String/Array/Path Conversion functions to convert a LabVIEW data type to a data type that MathScript, the MATLAB software, or the Xmath software supports.