How to replace approximate real numbers near zero in expression with exact integer 0?

15 views (last 30 days)
Sometimes we have very small coefficients in symbolic operations.
syms x y
y = sin(pi)*x;
The result is
y =(4967757600021511*x)/40564819207303340847894502572032
How to replace approximate real numbers near zero in expression with exact integer 0?

Accepted Answer

Mark Sherstan
Mark Sherstan on 13 Dec 2018
Refer to the post here. It refers to your exact question.

More Answers (1)

Walter Roberson
Walter Roberson on 13 Dec 2018
syms x y
Pi = sym('pi')
y = sin(Pi)*x;

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!