How to change radians into degrees?

5 vues (au cours des 30 derniers jours)
Hami the Penguin
Hami the Penguin le 6 Sep 2019
Hi,
I was asked to solve the following question using MATLAB:
Annotation 2019-09-05 230636.png
I tried solving it, and got the following results:
Annotation 2019-09-05 230704.png
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.

Réponses (2)

James Tursa
James Tursa le 6 Sep 2019
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.

madhan ravi
madhan ravi le 6 Sep 2019
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.

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by