RIGHTDIVIDE Matrix Equation Solver/Divide Operator
Section: Mathematical Operators
Usage
The divide operator/
is really a combination of three
operators, all of which have the same general syntax:
Y = A / B
where A
and B
are arrays of numerical type. The result Y
depends
on which of the following three situations applies to the arguments
A
and B
:

A
is a scalar,B
is an arbitraryn
dimensional numerical array, in which case the output is the scalarA
divided into each element ofB
. 
B
is a scalar,A
is an arbitraryn
dimensional numerical array, in which case the output is each element ofA
divided by the scalarB
. 
A,B
are matrices with the same number of columns, i.e.,A
is of sizeK x M
, andB
is of sizeL x M
, in which case the output is of sizeK x L
.
A
and B
are integers, the output is an integer also, while in the third case if A
and B
are integers, the output is of type double
.
Function Internals
There are three formulae for the times operator. For the first form
and the second form
In the third form, the output is defined as:
and is used in the equation Y B = A
.
Examples
The rightdivide operator is much less frequently used than the leftdivide operator, but the concepts are similar. It can be used to find leastsquares and minimum norm solutions. It can also be used to solve systems of equations in much the same way. Here's a simple example:> B = [1,1;0,1]; > A = [4,5] A = 4 5 > A/B ans = 4 1