mldivide
Matrix left division (A \ B).
Syntax
Section titled “Syntax”C = mldivide(A, B)Description
Section titled “Description”Returns A \ B — the solution X to A * X = B. For square non-singular A, equivalent to inv(A) * B but faster and more numerically stable. For non-square A, returns the least-squares solution. Same as the \ operator on matrices.
For large or specially-structured systems, linsolve lets you provide structure hints for additional speed.
Examples
Section titled “Examples”A = magic(3); b = [15; 15; 15];x = A \ b % solves A*x = bnorm(A*x - b) % near-zero