- #1
noblegas
- 268
- 0
Homework Statement
[tex] x_k+1=x_k-(f(x_k)/f'(x_k)), x_0=.5[/tex]Homework Equations
The Attempt at a Solution
Not really a math question, just a computation question. I want to put a do loop around Newton's method using mathlab.
[tex]x_1=x_0-(f(x_0)/f'(x_0)), x_0=.5,x_2=x_1-(f(x_1)/f'(x_1)),..., x_100=x_99-f(x_99)/f'(x_99) [/tex]
Would I write my 100 iterations in MATLAB like this:
for i=[0:100]
x_0=.5
x_i+1=x_i-f(x_i)/f'(x_i)
end