functionfromFile
Read a StateSpace data record from mat-file
Information
Syntax
ss = StateSpace.Import.fromFile(fileName, matrixName)
Description
Reads and loads a state space system from a mat-file fileName. The file must contain the matrix [A, B; C, D] named matrixName and the integer nx representing the order of the system, i.e. the number of rows of the square matrix A.
Example
algorithm
ss:=Modelica_LinearSystems2.StateSpace.Import.fromFile("stateSpace.mat", "ABCD");
// ss=StateSpace(
A=[-1, 0, 0; 0, -2, 0; 0, 0, -3],
B=[1; 1; 0],
C=[1, 1, 1],
D=[0])
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | "dslin.mat" | Name of the state space system data file |
| String | matrixName | "ABCD" | Name of the state space system matrix |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace2 | result | Model read from file |