Iteration for String (Crossed) method

3 visualizaciones (últimos 30 días)
Deividas David
Deividas David el 21 de Nov. de 2021
Comentada: Rik el 21 de Nov. de 2021
Hello, I currently have written code for Newton method. However, I need to change it to String or also known as Crossed method and I have no idea how to do that. My current one is below:
x0 = a; dx = eps;
atlikta = 0;
while ~atlikta
x = x0;
f0 = eval(f);
x = x + dx;
fd = eval(f);
df = (fd - f0) / dx;
x1 = x0 - f0 / df;
if abs(x1 - x0) < eps
atlikta = 1;
else
x0 = x1;
end
spr = x1;
end
  1 comentario
Rik
Rik el 21 de Nov. de 2021
Even in Octave you shouldn't need eval here.
Also, this is completely undocumented code, and you don't explain what changes you want to make. It sounds to me like you need to implement an entirely different algorithm, but you don't explain the differences, nor what you have tried.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Octave en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by