Iteration for String (Crossed) method

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 个评论

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.

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Octave 的更多信息

标签

评论:

Rik
2021-11-21

Community Treasure Hunt

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

Start Hunting!

Translated by