.Modelica.Utilities.Streams.readRealMatrix

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

Interface

impure function readRealMatrix
  extends Modelica.Icons.Function;
  input String fileName "File where external data is stored" annotation(
    Dialog(loadSelector(filter = "MATLAB MAT files (*.mat)", caption = "Open MATLAB MAT file")));
  input String matrixName "Name / identifier of the 2D Real array on the file";
  input Integer nrow "Number of rows of the 2D Real array";
  input Integer ncol "Number of columns of the 2D Real array";
  input Boolean verboseRead = true "= true: Print info message; = false: No info message";
  output Real matrix[nrow, ncol] "2D Real array";
end readRealMatrix;

Generated at 2024-12-24T19:25:53Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos