function fromStateSpace
import Modelica;
import MatricesMSL = Modelica.Math.Matrices;
import Modelica_LinearSystems2;
import Modelica_LinearSystems2.Utilities.Types.Method;
input Modelica_LinearSystems2.StateSpace sc "Continuous linear state space system";
input Modelica.Units.SI.Time Ts "Sample time";
input Modelica_LinearSystems2.Utilities.Types.Method method = Modelica_LinearSystems2.Utilities.Types.Method.Trapezoidal "Discretization method";
output Modelica_LinearSystems2.WorkInProgress.DiscreteStateSpace sd(redeclare Real A[size(sc.A, 1), size(sc.A, 2)], redeclare Real B[size(sc.B, 1), size(sc.B, 2)], redeclare Real C[size(sc.C, 1), size(sc.C, 2)], redeclare Real D[size(sc.D, 1), size(sc.D, 2)], redeclare Real B2[size(sc.B, 1), size(sc.B, 2)]) "Discrete state space system";
end fromStateSpace;