functionreadSystemDimension
Read the order nx of state matrix and the numbers nu and ny of inputs and outputs
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
xuy = Streams.readSystemDimension(fileName, matrixName);
Description
Opens the given MATLAB MAT file and reads the dimensions of state matrix matrixName.
Returns the order nx of the matrix and the numbers nu and ny of inputs and outputs, ordered as
xuy[3] = {nx, nu, ny};
Example
// Generate dslin.mat of the double pendulum example first
Modelica_LinearSystems2.Utilities.Import.linearize(
"Modelica_LinearSystems2.Utilities.Plants.DoublePendulum", 1.0);
// Read dimensions of state matrix of the linearized system
readSystemDimension("dslin.mat", "ABCD")
// = {6, 1, 8}
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | "stateSpace.mat" | File containing the matrix matrixName, e.g. A.mat, dsin.txt |
| String | matrixName | "ABCD" | Name of the generalized state space system matrix |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer[3] | xuy | Order of matrixName; size of u; size of y |