Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

zscore() kills vrrotvec()?

1 Ansicht (letzte 30 Tage)
Gabor Bekes
Gabor Bekes am 14 Sep. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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.

Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by