How do i prevent big fractions ?
Show older comments
Hello,
my function is of the form f = 9/r^10 - 1/6561. I have to apply f on a vector x, as f(x), and all of the terms are like f(38.935852412448142) = 'some really big fraction'. My x has 332 entries and Matlab does this calculation really slowly. Is there a way, so that f(x) is a decimal?
1 Comment
James Tursa
on 28 Nov 2016
Please post the exact code you are using. Is this using the Symbolic Toolbox?
Answers (1)
Walter Roberson
on 28 Nov 2016
2 votes
vpa() the expression.
Categories
Find more on Assumptions 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!