Reputation: 677
Where can I find the the documentation for this sort of division and output? Why is the results different from 1./a?
a = [4,5,6,8]
>> 1/a'
ans =
0 0 0 0.1250
Upvotes: 0
Views: 286
Reputation: 2070
For arrays, the operand /
is the mrdivide
function: the result of B/A will be one solution of the linear system xA=B
.
It is completely different from the operand ./
, which corresponds to the rdivide
function.
Note that, as stated in the comments, a scalar in Matlab is treated as a 1x1 matrix.
Upvotes: 3
Reputation: 36720
You are asking matlab to solve the equitation x*[4,5,6,8]'=1
, one possible solution is [0,0,0,.125]
Upvotes: 0