Iteration for String (Crossed) method
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Rik
2021년 11월 21일
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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Octave에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!