function wrapper_modifyX
input Real X_real[:, size(X_real, 1)] "Eigenvector matrix, real part";
input Real X_imag[size(X_real, 1), size(X_real, 2)] "Eigenvector matrix, imaginary part";
input Integer n "Order of X";
input Real S_real[size(X_real, 1), :] "Eigenvector bases, real part";
input Real S_imag[size(S_real, 1), size(S_real, 2)] "Eigenvector bases, imaginary part";
input Integer m "Rank of the system input matrix B; S_real and S_imag must have n*m columns";
input Integer ncp "number of complex pairs";
input Integer steps "Number of iterations";
input Boolean IniX = false "Initial values of X are provided";
output Real Xm_real[size(X_real, 1), size(X_real, 2)] = X_real;
output Real Xm_imag[size(X_imag, 1), size(X_imag, 2)] = X_imag;
end wrapper_modifyX;