Deriving rotation angle from the eigenvectors
18 ビュー (過去 30 日間)
古いコメントを表示
For an ellipsoid, how can I get the rotation angle from the eigenvectors?
3 件のコメント
Qingda Hu
2022 年 3 月 15 日
Probably too late but I was trying to use the same ellipsoid_fit function
If you linearize x,y,z and just multiple it by the evecs you get what you want
[center, radii, evecs, pars ] = ellipsoid_fit_new(... );
[X,Y,Z] = ellipsoid(0,0,0,radii(1),radii(2),radii(3));
Xlin = X(:);
Ylin = Y(:);
Zlin = Z(:);
rotatedXYZ = [Xlin,Ylin,Zlin]*evecs';
X = reshape( rotatedXYZ(:,1),size(X));
Y = reshape( rotatedXYZ(:,2),size(X));
Z = reshape( rotatedXYZ(:,3),size(X));
surf(X,Y,Z);
(you can translate it as well)
Hopefully this is useful for someone.
回答 (1 件)
Matt J
2022 年 3 月 15 日
編集済み: Matt J
2022 年 3 月 15 日
If you download ellipsoidalFit() to do the fitting, the yaw-pitch-roll angles are avaialble directly from the object,
>> load data
>> fitobj=ellipsoidalFit(xyz)
fitobj =
ellipsoidalFit with properties:
center: [5.0483 2.0378 7.0195]
a: 20.0700
b: 10.0469
c: 4.9622
yaw: 39.6951
pitch: -29.7995
roll: 50.4333
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!