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.© BrainMass Inc. brainmass.com October 9, 2019, 3:54 pm ad1c9bdddf
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 ...
This shows how to use Matlab to find roots, including complex roots.