mldivideSolving
x = mldivide(A, B)x = A \ BA and B should be matrices having the same numbers of rows; otherwise, elementwise division A.\B (or ldivide(A,B)) is performed if any of the following conditions is satisfied:| Conditions | A | B |
|---|---|---|
| 1 | Scalar | ndims(A) > 2 |
| 2 | ndims(A) > 2 | Scalar |
| 3 | Empty | Empty |
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 eps * norm(A), i.e., A nearly singular or badly conditioned.A is not square, QR decomposition is used to obtain a solution that minimises the error A is rank deficient.