function assignPolesMI_rob2
extends Modelica.Icons.Function;
import Modelica.ComplexMath;
import Modelica_LinearSystems2.ComplexMathAdds;
import Modelica_LinearSystems2.ComplexMathAdds.Internal.C_transpose;
import Modelica_LinearSystems2.StateSpace;
import Re = Modelica.ComplexMath.real;
import Im = Modelica.ComplexMath.imag;
import Modelica.Utilities.Streams.print;
input Real A[:, size(A, 1)] "system matrix";
input Real B[size(A, 1), :] "control input matrix";
input Complex gamma[size(A, 1)];
input Boolean IniX = false "Initial values of X are provided";
input Complex Xini[size(A, 1), size(A, 1)] = fill(Complex(0), size(A, 1), size(A, 1)) "Initial values of the eigenvectors X";
output Real K[size(B, 2), size(A, 1)] "feedback matrix";
output Complex X[size(A, 1), size(A, 2)] = Xini "eigen vectors of the closed loop system";
end assignPolesMI_rob2;