secant(f,x0,x1,tol)

Version 1.0.0.0 (557 Bytes) von N Narayan rao
SECANT METHOD
54 Downloads
Aktualisiert 19. Aug 2016

Lizenz anzeigen

The Newton-Raphson algorithm requires the evaluation of two functions (the function and its derivative) per each iteration. If they are complicated expressions it will take considerable amount of effort to do hand calculations or large amount of CPU time for machine calculations. Hence it is desirable to have a method that converges
clear all
clc
tol=0.01;
x0=1;
x1=2;
x=-3:0.1:3;
y=x.^3-3*x+1;
f=@(x)x^3-3*x+1;
plot(x,y)
grid on
z =secant(f,x0,x1,tol);

ref: https://mat.iitm.ac.in/home/sryedida/public_html/caimna/transcendental/iteration%20methods/secant/secant.html

Zitieren als

N Narayan rao (2024). secant(f,x0,x1,tol) (https://www.mathworks.com/matlabcentral/fileexchange/58784-secant-f-x0-x1-tol), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2013a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0

none
none
secant