MATLAB Answers

My matlab somehow in degree mode

22 views (last 30 days)
Qianliang on 22 Sep 2014
Commented: Star Strider on 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?

Accepted Answer

Star Strider
Star Strider on 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.
s_rad = sin(pi)
s_deg = sind(pi)
s_rad =
s_deg =

More Answers (1)

Muthu Annamalai
Muthu Annamalai on 22 Sep 2014
Have you tried the functions,
etc ?
Also the MAP toolbox has the functions deg2rad and rad2deg
  1 Comment
Qianliang on 22 Sep 2014
Thanks, but I am not looking for alternative code. I just want to fix it.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by