How to change radians into degrees?
7 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I was asked to solve the following question using MATLAB:
I tried solving it, and got the following results:
I tried rad2deg, but it continues to show the answer in radian form with an 'a' before tan. Can someone help me fix this problem?
Thank you.
0 件のコメント
回答 (2 件)
James Tursa
2019 年 9 月 6 日
Why are you using sym to find the angle? Just use atand( ) directly with the appropriate input. That seems to be the intent of the question.
0 件のコメント
madhan ravi
2019 年 9 月 6 日
As James says you can straight forward use atand() note when you use tand() the result is expressed in degrees. Therefor there is no need to use rad2deg() here.
help tand
The reason I think is that you think the answer you get in radians is because if you notice your code carefully you use the same variable name twice to compute angle in degrees and hypotenuse., what happens is you throw away the angle result and you replace it with the value of hypotenuse.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!