Filter löschen
Filter löschen

why simulink gives wrong answer of trigonometery

2 Ansichten (letzte 30 Tage)
mahmood hassan
mahmood hassan am 28 Jan. 2018
Kommentiert: Star Strider am 29 Jan. 2018
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)
  1 Kommentar
mahmood hassan
mahmood hassan am 28 Jan. 2018
Bearbeitet: mahmood hassan am 28 Jan. 2018
Image of the my simulink simulation is attached

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Star Strider
Star Strider am 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 Kommentare
Star Strider
Star Strider am 29 Jan. 2018
My pleasure.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by