Not getting expected results
古いコメントを表示
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.
回答 (1 件)
James Tursa
2020 年 5 月 12 日
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
5 件のコメント
satish kumar
2020 年 5 月 13 日
James Tursa
2020 年 5 月 13 日
I copied your entire code and ran it in the debugger, pausing it at the first iteration. R is the identitiy matrix.
satish kumar
2020 年 5 月 13 日
James Tursa
2020 年 5 月 13 日
Sure.
satish kumar
2020 年 5 月 13 日
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!