Solve systems of linear equations xA = B for x
x = B/Aexample
x = mrdivide(B,A)
the system of linear equations
x*A = B for
contain the same number of columns. MATLAB® displays a warning
A is badly scaled or nearly singular,
but performs the calculation regardless.
A is a scalar, then
A is a square
B is a matrix with
x = B/A is a solution to the equation
= B, if it exists.
A is a rectangular
m ~= n, and
B is a matrix
n columns, then
a least-squares solution of the system of equations
Solve a system of equations that has a unique
x*A = B.
A = [1 1 3; 2 0 4; -1 6 -1]; B = [2 19 8]; x = B/A
x = 1.0000 2.0000 3.0000
Solve an underdetermined system,
C = [1 0; 2 0; 1 0]; D = [1 2]; x = D/C
Warning: Rank deficient, rank = 1, tol = 6.280370e-16. x = 0 0.5000 0
MATLAB issues a warning but proceeds with calculation.
x is not an exact solution.
ans = 0 -2
A— Coefficient matrixvector | full matrix | sparse matrix
Coefficient matrix, specified as a vector, full matrix, or sparse
B must have
Complex Number Support: Yes