在MATLAB中求解矩阵? [英] Solving a matrix in MATLAB?
问题描述
在 MATLAB 中,如何解决x的(非平凡的)解Ax = 0 ?
How does one solve the (non-trivial) solution Ax = 0 for x in MATLAB?
A = matrix
x = matrix trying to solve for
我尝试了solve('A * x = 0','x'),但答案只有0.
I've tried solve('A * x = 0', 'x') but I only get 0 for an answer.
推荐答案
请注意,null(A)与(针对秩不足的矩阵)做以下相同的事情,但这是使用MATLAB中的svd(A)
函数(正如我在评论中提到的那样,这是null(A)
的作用).
Please note that null(A) does the same thing (for a rank-deficient matrix) as the following, but this is using the svd(A)
function in MATLAB (which as I've mentioned in my comments is what null(A)
does).
[U S V] = svd(A);
x = V(:,end)
有关此的更多信息,这是与此相关的链接(无法发布由于公式的原因,到这里.
For more about this, here's an link related to this (can't post it to here due to the formulae).
如果您想更直观地了解奇异值分解和特征值分解,请查看MATLAB中的eigshow
.
If you want a more intuitive feel of singular and eigenvalue decompositions check out eigshow
in MATLAB.
这篇关于在MATLAB中求解矩阵?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!