D = Streams.readMatrixD(fileName, matrixName);
Opens the given MATLAB MAT file and reads the matrix D of a state space system from this file.
// 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
readMatrixD("dslin.mat", "ABCD")
// =
// [0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0;
// 0.0]
function readMatrixD extends Internal.partialReadStateSpaceMatrix; output Real D[ny, nu] = matrixABCD[nx + 1:nx + ny, nx + 1:nx + nu]; end readMatrixD;