How can you solve non-polynomial equations using MATLAB?

  • Context: MATLAB 
  • Thread starter Thread starter chronicals
  • Start date Start date
  • Tags Tags
    Matlab Roots
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 10K views
chronicals
Messages
35
Reaction score
0
I have a function : f (n)=40*n^1.5-875*n+35000;

How can i solve this equation with MATLAB. I know how to solve polynomial equation but this is different i think.
 
Physics news on Phys.org
This is not a polynomial because your exponents are not all natural numbers.

Fortunately MATLAB doesn't have a problem with this and you can solve without much thought using the Symbolic Math Toolbox:

Code:
>> syms n
>> solve(40*n^1.5 - 875*n + 35000);
>> double(ans)
ans =
  1.0e+002 *
   3.8402 + 0.0000i
   0.6269 - 0.0000i