WOLFRAM SYSTEM MODELER

readRealMatrix

Read Real matrix from MATLAB MAT file

Wolfram Language

In[1]:=
SystemModel["Modelica.Utilities.Streams.readRealMatrix"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

Syntax

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

Inputs (5)

fileName

Type: String

Description: File where external data is stored

matrixName

Type: String

Description: Name / identifier of the 2D Real array on the file

nrow

Type: Integer

Description: Number of rows of the 2D Real array

ncol

Type: Integer

Description: Number of columns of the 2D Real array

verboseRead

Default Value: true

Type: Boolean

Description: = true: Print info message; = false: No info message

Outputs (1)

matrix

Type: Real[nrow,ncol]

Description: 2D Real array