Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

zscore() kills vrrotvec()?

1 vue (au cours des 30 derniers jours)
Gabor Bekes
Gabor Bekes le 14 Sep 2016
Clôturé : MATLAB Answer Bot le 20 Août 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.

Réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by