Newton Raphson Method on matlab
The algorithm of this code is based on
-
First
Get Function y=f(x)
and Differentiate f(x) -
Second
Set error, maximum iteration and initial X
-
Third
Program will in 3 situations.
- First, when error is bigger than lastest one.
- Second, when the error value converge to the error value you set
- Third, when the number of iteration reaches to number you set
-
I made this code to do my college assignment.
After making this, I compare mine with the codes that uploaded at Mathworks homepage.
And then, I thought,"oh shit, my code is more user friendly than uploaded codes."
(Actually, it's not. Just my opinion)
-
I am hoping that my code can help other undergraduate students' assignments