function calcK
import Re = Modelica.ComplexMath.real;
import Im = Modelica.ComplexMath.imag;
input Real A[:, size(A, 1)] "Real square system matrix";
input Real U0[size(A, 1), :] "U0 and Z are the decompositions of B";
input Real Z[size(U0, 2), size(U0, 2)] "Z and U0 are the decompositions of B";
input Complex gamma[size(A, 1)] "Assigned complex eigenvalues";
input Complex X[size(A, 1), size(A, 1)] "Closed loop eigenvectors";
input Integer nre "number of real eigenvalues";
output Real K[size(U0, 2), size(A, 1)] "Feedback matrix";
end calcK;