用 Octave 进行矩阵除法说明:
从这里开始对 Octave Matrix Division 的正式描述
http://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html
x / y
Right division. This is conceptually equivalent to the expression
(inverse (y') * x')'
But it is computed without forming the inverse of y'.
If the system is not square, or if the coefficient matrix is
singular, a minimum norm solution is computed.
这意味着这两个应该是相同的:
[3 4]/[4 5; 6 7]
ans =
1.50000 -0.50000
(inverse([4 5; 6 7]') * [3 4]')'
ans =
1.50000 -0.50000
首先要明白 Octave 矩阵除法不可交换,就像矩阵乘法不可交换一样。
这意味着 A / B 不等于 B / A
1/[1;1]
ans =
0.50000 0.50000
[1;1]/1
ans =
1
1
一除以单值矩阵一为一:
1/[1]
ans = 1
一除以单值三的矩阵等于 0.33333:
1/[3]
ans = .33333
一除以 (1x2) 矩阵:
1/[1;1]
ans =
0.50000 0.50000
Equivalent:
([1/2;1/2] * 1)'
ans =
0.50000 0.50000
请注意上面的说明,如说明所述,我们采用向量的范数。所以你会看到[1;1] 是如何变成[1/2; 1/2] 的。 '2' 来自向量的长度,1 来自提供的向量。我们再做一次:
一除以 (1x3) 矩阵:
1/[1;1;1]
ans =
0.33333 0.33333 0.33333
等效:
([1/3;1/3;1/3] * 1)'
ans =
0.33333 0.33333 0.33333
如果其中一个元素为负数怎么办……
1/[1;1;-1]
ans =
0.33333 0.33333 -0.33333
等效:
([1/3;1/3;-1/3] * 1)'
ans =
0.33333 0.33333 -0.33333
所以现在您对不提供方阵时 Octave 的作用有了大致的了解。要了解 Octave 矩阵除法在传递方阵时的作用,您需要了解反函数的作用。
我一直在手动标准化你的向量,如果你想要 octave 来做它们,你可以添加包来这样做,我认为下面的包将做我一直在做的向量标准化:
http://octave.sourceforge.net/geometry/function/normalizeVector.html
所以现在您可以将除法转换为等价的乘法。阅读这篇关于矩阵乘法如何工作的文章,您可以回溯并找出矩阵除法背后发生的事情。
http://www.purplemath.com/modules/mtrxmult2.htm