FUNCTION REFERENCE

mldivide

Solve a linear system, A\B.

Solve a linear system, A\B.

Syntax

X = mldivide(A, B)

Same as the operator A\B.

Example

mldivide([2 0; 0 4], [2; 4])   % [1; 1]

Sparse A: see sparse (Results); MATLAB's sparse LU memory is bounded here only by available memory (the factorization cannot be cancelled while it runs).

Differences from MATLAB: square A only, as for the operator; a singular A

raises an error. Complex input: a scalar A divides B elementwise; a square A is solved by LU (triangular A by substitution) with MATLAB's singular and RCOND warnings; rectangular complex systems are not implemented yet.

raises an error. With complex input, A may be a scalar (elementwise division of B by A) or a non-square matrix (least squares by column-pivoted QR with the rank-deficiency warning); square complex solves are not implemented yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.