.Modelica_LinearSystems2.WorkInProgress.StateSpace2.Import.fromFile

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])


Interface

encapsulated function fromFile
  import Modelica;
  import Modelica_LinearSystems2.StateSpace;
  import Modelica_LinearSystems2.WorkInProgress.StateSpace2;
  import Modelica_LinearSystems2;
  input String fileName = "dslin.mat" "Name of the state space system data file" annotation(
    Dialog(loadSelector(filter = "MAT files (*.mat);; All files (*.*)", caption = "state space system data file")));
  input String matrixName = "ABCD" "Name of the state space system matrix" annotation(
    Dialog);
  output StateSpace2 result(redeclare Real A[nx, nx], redeclare Real B[nx, nu], redeclare Real C[ny, nx], redeclare Real D[ny, nu]) "= model linearized at initial point";
end fromFile;

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos