functionreadMatrixD2

Read the feed forward matrix of a state space system

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

Information

Syntax

D = Streams.readMatrixD2(fileName, matrixName, nx, nu, ny);

Description

Opens the given MATLAB MAT file and returns the submatrix D of the matrix matrixName given as

D[ny, nu] = ABCD[nx+1:nx+ny, nx+1:nx+nu];

Example

// Generate dslin.mat of the double pendulum example first
Modelica_LinearSystems2.Utilities.Import.linearize(
  "Modelica_LinearSystems2.Utilities.Plants.DoublePendulum", 1.0);

// Read D matrix of the linearized system
readMatrixD2("dslin.mat", "ABCD", 6, 1, 8)
//  = 
// [0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0]

Inputs

TypeNameDefaultDescription
StringfileNameDataDir + "abcd.mat"
StringmatrixName"ABCD"Name of the generalized state space system matrix
IntegernxSystem order
IntegernuNumber of inputs
IntegernyNumber of outputs

Outputs

TypeNameDefaultDescription
Real[ny,nu]DABCD[nx + 1:nx + ny, nx + 1:nx + nu]