MATLAB Answers

Not getting expected results

3 views (last 30 days)
satish kumar
satish kumar on 12 May 2020
Commented: satish kumar on 13 May 2020
Het guys, i attached a code here. The problem is that the very first 'R' matrix i have to get is a Identity Matrix. Unfortunately, i don't know what went wrong there is some mistake. Could anyone shed some light, what i did wrong?. Thanking you in advance.


Sign in to comment.

Answers (1)

James Tursa
James Tursa on 12 May 2020
I get the identity matrix with your code:
>> phi = 0;
>> psi = 0;
>> theta = 0;
>> R=[cosd(phi).*cosd(psi)-sind(phi).*cosd(theta).*sind(psi) sind(phi).*cosd(psi)+cosd(phi).*cosd(theta).*sind(psi) sind(theta).*sind(psi)
-cosd(phi).*sind(psi)-sind(phi).*cosd(theta).*cosd(psi) -sind(phi).*sind(psi)+cosd(phi).*cosd(theta).*cosd(psi) sind(theta).*cosd(psi)
sind(phi).*sind(theta) -cosd(phi).*sind(theta) cosd(theta)]
R =
1 0 0
0 1 0
0 0 1


Show 2 older comments
satish kumar
satish kumar on 13 May 2020
Really, james. I need one more help from you redarding the next part of this code. should i write here?
satish kumar
satish kumar on 13 May 2020
Basically, i am expecting plots like screenshot(26).png which i am attaching here by running the code practice3.m . Could you just help me through.

Sign in to comment.

Translated by