need help finding convergence
Ältere Kommentare anzeigen
I have the following equation in matlab g1=@(x) tan(exp(x/20)) now I need to run this until I get two consecutive approximations to the root are close enough or divergence is determined. here is how i'm in iterating n=0; a=1; n=n+1; x1(n)=g1(a); a=x1(n); now this does work and I can run it, but i can't make the loop until i know how to find the error between xold and xnew. So my question is how to i make this so the equation is in the form xnew=g(xold)?
Akzeptierte Antwort
Weitere Antworten (1)
Tony Montgomery
am 20 Sep. 2014
0 Stimmen
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!