ldivide, rdivide - Left or right array division
Syntax
ldivide(A,B)
A.\B
rdivide(A,B)
A./B
Description
ldivide(A,B) and the equivalent A.\B divides each entry of B by
the corresponding entry of A. A and B must
be arrays of the same size. A scalar value for either A or B is
expanded to an array of the same size as the other.
rdivide(A,B) and the equivalent A./B divides each entry of A by
the corresponding entry of B. A and B must
be arrays of the same size. A scalar value for either A or B is
expanded to an array of the same size as the other.
Example
A = [1 2 3;4 5 6];
B = ones(2, 3);
A.\B
ans =
1.0000 0.5000 0.3333
0.2500 0.2000 0.1667See Also
Arithmetic Operators, mldivide, mrdivide
 | ldl | | le |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit