Computes the initial response of a system in discrete state space form:
x(Ts*(k+1)) = A * x(Ts*k) y(Ts*k) = C * x(Ts*k) x_continuous(Ts*k) = x(Ts*k)
Note that the system input u is equal to zero.
encapsulated function initialResponse1 import Modelica; import Modelica_LinearSystems2; import Modelica_LinearSystems2.DiscreteStateSpace; input DiscreteStateSpace dss "Linear system in discrete state space form"; input Real x0[size(dss.A, 1)] = zeros(size(dss.A, 1)) "Initial system state"; input Integer samples "Number of samples"; output Real y[samples, size(dss.C, 1)] "System response (dimension: (input samples) x (number of outputs))"; output Real x[samples, size(dss.A, 1)] "State trajectories (dimension: (input samples) x (number of states)"; end initialResponse1;