MatLab 中向量的右除法

Right Divison of a Vector in MatLab

给定 a 和 b 向量:

a=[1;0;0];
b=[0;1;0];

什么意思:

C=a/b

我理解“/”(矩阵右除)应该等同于

C=a*inv(b)

当然,矢量没有 "nicely" 定义的逆。

mrdivide 文档的相关部分是第三个要点。给定一个线性方程组 x*A = b,则:

If A is a rectangular m-by-n matrix with m ~= n, and B is a matrix with n columns, then x = B/A returns a least-squares solution of the system of equations x*A = B.

在您的示例中,您得到以下内容:

>> a=[1;0;0];
>> b=[0;1;0];
>> C=a/b

C =

     0     1     0
     0     0     0
     0     0     0

你可以确认这是方程组的解 C*b = a:

>> C*b

ans =

     1
     0
     0