How do i prevent big fractions ?

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

Please post the exact code you are using. Is this using the Symbolic Toolbox?

Sign in to comment.

Answers (1)

Asked:

on 28 Nov 2016

Answered:

on 28 Nov 2016

Community Treasure Hunt

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

Start Hunting!