impure functionreadRealMatrix

Read Real matrix from MATLAB MAT file

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

matrix = Streams.readRealMatrix(fileName, matrixName, nrow, ncol, verboseRead)

Description

Function readRealMatrix(..) opens the given MATLAB MAT file (in format v4, v6, v7, and if HDF is supported in the Modelica tool, also v7.3), and reads the given matrix from this file. The dimensions of this matrix must first be inquired with function readMatrixSize and passed via arguments nrow and ncol to this function.

Example

See Examples.ReadRealMatrixFromFile.

See also

readMatrixSize, writeRealMatrix

Inputs

TypeNameDefaultDescription
StringfileNameFile where external data is stored
StringmatrixNameName / identifier of the 2D Real array on the file
IntegernrowNumber of rows of the 2D Real array
IntegerncolNumber of columns of the 2D Real array
BooleanverboseReadtrue= true: Print info message; = false: No info message

Outputs

TypeNameDefaultDescription
Real[nrow,ncol]matrix2D Real array