Effacer les filtres
Effacer les filtres

Value of angle theta

15 vues (au cours des 30 derniers jours)
Vinay
Vinay le 26 Juin 2023
I'm trying to find the value of an angle (theta) given the values of cosine (cos(theta)) and sine (sin(theta)). However, when I use the inverse trigonometric functions acosd(cos(theta)) and asind(sin(theta)), I end up with two different values for theta. How should I handle this situation?

Réponse acceptée

Samay Sagar
Samay Sagar le 26 Juin 2023
This can be happening for negative values of theta since the range of arcsin is [-pi/2,pi2] and that of arccos is [0,pi] . You can try to first calculate tan(theta) and then calculate arctan. Something like this might help:
a = sin(x)
b = cos(y)
c = tan(y)
d = atand(c) % or use atan2d as d = atan2d(sin(x),cos(x))

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by