Reputation: 338
Given a and b vectors:
a=[1;0;0];
b=[0;1;0];
What is the meaning of:
C=a/b
I understand "/" (Matrix Right Division) should be equivalent to
C=a*inv(b)
But of course, a vector doesn't have a "nicely" defined inverse.
Upvotes: 1
Views: 43
Reputation: 125874
The relevant part of the documentation for mrdivide
is the third bullet point. Given a system of linear equations x*A = b
, then:
If
A
is a rectangularm
-by-n
matrix withm ~= n
, andB
is a matrix withn
columns, thenx = B/A
returns a least-squares solution of the system of equationsx*A = B
.
In your example, you get the following:
>> a=[1;0;0];
>> b=[0;1;0];
>> C=a/b
C =
0 1 0
0 0 0
0 0 0
And you can confirm that this is a solution for the system of equations C*b = a
:
>> C*b
ans =
1
0
0
Upvotes: 2