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.
Show older comments
%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
Accepted Answer
More Answers (1)
ebru
on 8 Sep 2014
0 votes
Categories
Find more on Performance and Memory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!