How to replace approximate real numbers near zero in expression with exact integer 0?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 13 Déc 2018
syms x y
Pi = sym('pi')
y = sin(Pi)*x;
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!