t1 = (t0 - (y1/y2)); %Creates a t1 value
while abs(t1-t0) > 1e-6 %Runs a loop when the value is larger than our error
t0 = t1; %New t1 becomes t0
y1 = f(t0); %Defines our functions at new t1
y2 = f(t0); t1 = (t0 - (y1/y2)); %New t-value, essentially t2 and loops back through.
enddisp(t1)
MATLAB: Newton-Raphson Method using a WHILE Loop. Help
newtonroot finding
Related Question
- Euler’s method, error, when I run the code i get an error message when trying to create the array for the x values, Array indices must be positive integers or logical values.
- How to plot a graph from the following code
- Not outputting all the values for Euler’s formula
- Matrix of functions of two variables
- Second Order, Piecewise ODE help
- Solve an equation using eulers method and two different derivatives.
Best Answer