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
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | DataDir + "abcd.mat" | |
| String | matrixName | "ABCD" | Name of the generalized state space system matrix |
| Integer | nx | System order | |
| Integer | nu | Number of inputs | |
| Integer | ny | Number of outputs |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[ny,nu] | D | ABCD[nx + 1:nx + ny, nx + 1:nx + nu] |