更新时间:2023-07-21 09:38:16
您正在寻找v = [x; y; z]和...的A * v = v的非平凡解决方案v ... >
You're looking for a non-trivial solution v to A*v=v with v=[x;y;z] and...
A =
0.70710678118655 0 0.70710678118655
-0.50000000000000 0.70710678118655 0.50000000000000
-0.50000000000000 -0.70710678118655 0.50000000000000
您可以将其转换为(A-I)v = 0,其中I是3x3单位矩阵.找到非平凡的解决方案所要做的就是检查A-I的空空间:
You can transform this into (A-I)v=0 where I is the 3x3 identity matrix. What you have to do to find a nontrivial solution is checking the null space of A-I:
>> null(A-eye(3))
ans =
0.67859834454585
-0.67859834454585
0.28108463771482
因此,您有一个一维空空间.否则,您将看到不止一列.列的每个线性组合都是该空空间中A-I映射到空向量的一个点.因此,此向量的每一个倍数都可以解决您的问题.
So, you have a onedimensional nullspace. Otherwise you'd see more than one column. Every linear combination of the columns is a point in this null space that A-I maps to the null vector. So, every multiple of this vector is a solution to your problem.
实际上,您的矩阵A是第一类旋转矩阵,因为det(A)= 1并且A'* A = identity.因此它的特征值是1,旋转轴是相应的特征向量.我上面计算出的向量是归一化的旋转轴.
Actually, your matrix A is a rotation matrix of the first kind because det(A)=1 and A'*A=identity. So it has an eigenvalue of 1 with the rotation axis as corresponding eigenvector. The vector I computed above is the normalized rotation axis.
注意:为此,我将您的0.7071替换为sqrt(0.5).如果需要舍入误差,但您必须事先知道一个平凡的解决方案,***的选择是对A-I进行奇异值分解并选择最正确的奇异矢量:
Note: For this I replaced your 0.7071 with sqrt(0.5). If rounding errors are a concern but you know in advance that there has to be a nontrivial solution the best bet is to do a singular value decomposition of A-I and pick the right most right singular vector:
>> [u,s,v] = svd(A-eye(3));
>> v(:,end)
ans =
0.67859834454585
-0.67859834454585
0.28108463771482
这样,您可以计算出最小化| A * v-v |的向量v在| v | = 1的约束下|.|是欧几里得范数.
This way you can calculate a vector v that minimizes |A*v-v| under the constraint that |v|=1 where |.| is the Euclidean norm.