Finding roots with MATLAB

  • MATLAB
  • Thread starter chronicals
  • Start date
  • #1
36
0

Main Question or Discussion Point

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.
 

Answers and Replies

  • #2
1,233
17
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
 

Related Threads for: Finding roots with MATLAB

  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
1
Views
2K
Replies
1
Views
996
Replies
1
Views
26K
Replies
1
Views
11K
  • Last Post
Replies
3
Views
6K
Top