How could i write a matlab code for newton's iteration for implicit functions. I've bagan to write it up but I'm stuck at the loop.
显示 更早的评论
%the x is held fixed, from [-5:1001:5]. the initial for y=5. I either have to complete it for 40 iterations or for abs(f(x,yn))<10^-10
syms x y ynew
x= -5;
y= 5;
f = exp(y-x.^2)-sin(y)-pi;
ynew = y + f./diff(f);
while abs(f)<1e-10;
y=ynew
x= x+ 0.00999001
end
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Performance and Memory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!