Thanks very much for your fime. However in my problem, the solution is exactly rank k (I generate it with the product of two gaussian random matrices of size M×k and k× M) without adding any noise. That's very strange. I guessed it may be because of the preconditioning, then I replace it with "fixedrankfactory_2factors" factory. However, another error in matlab says
Error using lyap (line 35)
The input arguments of the "lyap" command cannot have Inf or NaN entries.
Error in fixedrankfactory_2factors/projection (line 125)
Omega = lyap(SS, SS,-AS);
Error in fixedrankfactory_2factors/ehess2rhess (line 115)
Hess = M.proj(X, Hess);
Error in getHessian (line 84)
hess = problem.M.ehess2rhess(x, egrad, ehess, d);
Error in tCG (line 145)
Hdelta = getHessian(problem, x, delta, storedb, key);
Error in trustregions (line 470)
tCG(problem, x, fgradx, eta, Delta, options, storedb, key);
Error in ranking_fixedrankTR_nonreg (line 98)
[Xcg, xcost, info, options] = trustregions(problem, X0, options);
How can it happen just out of sudden in some iteration of trust region? Thanks very much.