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?
I tried the next function, but there is an error in the decimals. I got this result:
y_correct = [0.4347 0.7167
function Rotated_Vector = RotTimesVec(Rotation_Matrix,Vector)
[a,b,Dim] = size(Rotation_Matrix);
Rotated_Vector = ;
Ans = Vector(:,:,n)*Rotation_Matrix(:,:,n);
Rotated_Vector = [Rotated_Vector Ans'];
Find the treasures in MATLAB Central and discover how the community can help you!
Select a Web
Choose a web site to get translated content where available and see local events and
offers. Based on
your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country
sites are not optimized for visits from your location.
Contact your local office