Explore BrainMass

# Matlab and roots

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Hi,

I need help in using Matlab to build an m file for
solving non-linear equations using the Newton-Raphson
method (or another recommended method.) I need a clear
explanation of the process of creating an m file, and
also using it to find the roots of the following two
equations as examples:

1) f(x) = exp(-x) - sin((pi/2)*x)

2) x^5 - 17*x^4 + 124*x^3 - 508*x^2 + 1035*x - 875 = 0

The method must also find complex roots if they exist.

https://brainmass.com/math/linear-programming/matlab-roots-16770

#### Solution Preview

Open MatLab !
Now click File - New - M-file and click
A new window opens. Give a new name and save it to your fav directory.
Now we can give the commands.
Always try to begin by the commands ...

#### Solution Summary

This shows how to use Matlab to find roots, including complex roots.

\$2.49