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

TypeNameDefaultDescription
StringfileName"dslin.mat"Name of the state space system data file
StringmatrixName"ABCD"Name of the state space system matrix

Outputs

TypeNameDefaultDescription
StateSpace2resultModel read from file