My matlab somehow in degree mode
25 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Qianliang
le 22 Sep 2014
Commenté : Star Strider
le 22 Sep 2014
I was trying to write some codes for signal processing. Somehow my sin,cos...commands are in degree mode. And I think those functions are somehow malfunctioned. Could anyone help me fix it?
0 commentaires
Réponse acceptée
Star Strider
le 22 Sep 2014
It is not in ‘degree mode’. The sin(pi)=0, or as close as MATLAB can get to it, that in this instance is approximately eps.
Compare:
s_rad = sin(pi)
s_deg = sind(pi)
produce:
s_rad =
122.4647e-018
s_deg =
54.8037e-003
2 commentaires
Plus de réponses (1)
Muthu Annamalai
le 22 Sep 2014
Have you tried the functions,
sind(180)
cosd(90)
etc ?
Also the MAP toolbox has the functions deg2rad and rad2deg
Voir également
Catégories
En savoir plus sur Phylogenetic Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!