Clear Filters
Clear Filters

why simulink gives wrong answer of trigonometery

2 views (last 30 days)
Kindly guide me when I am doing trigonometry operation by Simulink why it gives the wrong result for sin(pi), sin(2pi) and cos(pi/2)

Accepted Answer

Star Strider
Star Strider on 28 Jan 2018
It seems that you are seeing floating-point approximation error.
See Why is 0.3 - 0.2 - 0.1 (or similar) not equal to zero? (link) for a comprehensive discussion.
  7 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!