Info
此问题已关闭。 请重新打开它进行编辑或回答。
zscore() kills vrrotvec()?
1 次查看(过去 30 天)
显示 更早的评论
Try the following: create an n x 3 matrix with randn(). Apply some oblique rotation to each of its rows.
a1 = randn(100,3);
a2 = (rot_mat*a1')';
Now, use vrrotvec() and vrrotvec2mat() to calculate which rotation matrix was used.
for ii = 1:100
rm1{ii} = vrrotvec2mat(vrrotvec(a1(ii,:),a2(ii,:)));
end
Now, visualize the created rotations somehow. You will see that the matrices vrrotvec() provided are not exactly close to each other (okay, they are completely off). Try shifting the means and increasing the standard deviation, for example like this:
a1 = bsxfun(@plus,a1,[0,5,10]);
a1 = bsxfun(@times,a1,[1,2,3]);
(You can also check the results with mean() and std().) If you repeat your matrix visualization (or compare numerically, like reshape them to row vectors and use uniquetol()), you will see that the accuracy of rotations given by vrrotvec() drastically improved. I presume this is some numerical issue.
Any comments, suggested workarounds are appreciated.
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!