How can I round the coefficient of a term containing symbolic variables?
Show older comments
Friends,I need to round off a term containing symbolic variables to zero when its coefficient is numerically very small value.
For eg: in the following expression:
4.5*h + 6.12e-17*cos(q)
I need to round off the second term to zero as its coefficient is very small.
(q and h are symbolic varialbes)
How can I do this?
Thanks in advance.
(for those who want to have more details on how I arrived at that expression:
This was my preliminary result:
(4967757600021511*cos(q))/81129638414606681695789005144064
I used VPA to convert this to decimal form and the result obtained was
0.00000000000000006123233995736766035868820147292*cos(q)
Then, I set the no:of significant digits to 3 and the result was:
6.12e-17*cos(q)
2 Comments
DM
on 6 Feb 2015
Hi, I was wondering were you able to round the coefficient or not? I have a similar problem.
Accepted Answer
More Answers (0)
Categories
Find more on Common Operations 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!