MATLAB Answers

0

Calculating sin and cos functions

Asked by Mohsin Shah on 29 May 2011
Hello, i calculated the value of sin(45) in Matlab, the result was sin(45)=0.8509 and for cosin i got cos(45)= 0.5253. From general mathematics we know that sin(45)=cos(45) then why Matlab is giving different results??

  0 Comments

Sign in to comment.

2 Answers

Answer by Paulo Silva
on 29 May 2011
 Accepted Answer

Those functions work in radians not degrees, try this
cosd(45)
sind(45)

  1 Comment

thank u so much

Sign in to comment.


Answer by bym
on 29 May 2011

sin() & cos() arguments are in radians. If you want degrees use
sind() cosd()

  1 Comment

thank u so much

Sign in to comment.