Problem 46669. Rotation matrix of a sequence of 3D points
Solution Stats
Problem Comments
-
4 Comments
Please, do not use isequal with floats, prefer instead abs(a-b) < tol. Notice how my solution used round and had to fix errors manually despite the operation being correct.
The assert cannot be used in the way, it is used in the testsuit.
The error raised is not because of a wrong result but because of a wrong use of assert()
Could someone be so kind and please fix the test suite?
Pls fix your test suite. you shouldn't use -assert- for a matrix.
Solution Comments
-
1 Comment
I tried the next function, but there is an error in the decimals. I got this result:
y_correct = [0.4347 0.7167
0.2266 0.5861
0.3375 0.9331]
function Rotated_Vector = RotTimesVec(Rotation_Matrix,Vector)
[a,b,Dim] = size(Rotation_Matrix);
Rotated_Vector = [];
for n=1:Dim
Ans = Vector(:,:,n)*Rotation_Matrix(:,:,n);
Rotated_Vector = [Rotated_Vector Ans'];
end
end
Problem Recent Solvers1
Suggested Problems
-
Count from 0 to N^M in base N.
231 Solvers
-
374 Solvers
-
Is this group simply connected?
26 Solvers
-
Matrix with different incremental runs
332 Solvers
-
66 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!