linsolveSolving
x = linsolve(A, B)A and B should be A is not square, QR decomposition is used to obtain a solution that minimises the error A is rank deficient.A is a square matrix, LU decomposition is used. It returns an error if A is singular. It reports a warning and proceeds to compute a solution anyway, if the reciprocal of the condition number of A is less than norm(A)*eps (i.e., A nearly singular or badly conditioned).[x,r] = linsolve(A, B)A and B are matrices as specified for x = linsolve(A,B) above.
The output x is the same as that obtained by x = linsolve(A,B).
r is
A when A is not square, A when A is square.Warning messages for rank deficiency and badly conditioned matrix are suppressed.