.Modelica_LinearSystems2.Internal.StateSpace2.'constructor'.fromABCDMatrices

Information

Syntax

ss = 'constructor'.fromABCDMatrices(A, B, C, D)

Description

This function constructs a StateSpace record ss with

ss.A = A;
ss.B = B;
ss.C = C;
ss.D = D;

Example

  Real A[1,1] = [1];
  Real B[1,1] = [1];
  Real C[1,1] = [1];
  Real D[1,1] = [0];

public
  StateSpace ss;

algorithm
  ss := 'constructor'.fromABCDMatrices(A, B, C, D);
  // ss.A = [1]
  // ss.B = [1]
  // ss.C = [1]
  // ss.D = [0]

Interface

function fromABCDMatrices
  import Modelica;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.Internal.StateSpace2;
  input Real A[:, size(A, 1)] "Square state matrix";
  input Real B[size(A, 1), :] "Input matrix";
  input Real C[:, size(A, 1)] "Output matrix";
  input Real D[size(C, 1), size(B, 2)] "Feedforward matrix";
  output StateSpace2 result(redeclare Real A[size(A, 1), size(A, 2)], redeclare Real B[size(B, 1), size(B, 2)], redeclare Real C[size(C, 1), size(C, 2)], redeclare Real D[size(D, 1), size(D, 2)]) "State space record";
end fromABCDMatrices;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos