Newtons Method

for f(x)= x^3-6*x^2+11*x-6.1

Vous suivez désormais cette soumission

for f(x)= x^3-6*x^2+11*x-6.1
a) Use Newton's Method
%bşıkkı - Newton's Method
x0=3;
error=x0.^3-6*x0.^2+11*x0-6.1;
while abs(error)>= 1e-6
%F fonksiyonuna tahmini değer üzerinden hesaplama yapıyoruz.
f=x0.^3-6*x0.^2+11*x0-6.1;
% F fonksiyonunun türevini alıyoruz.
df=3*x0.^2-12*x0+11;
x1=x0-f./df;
error=x1.^3-6*x1.^2+11*x1-6.1;
x0=x1;
end
fprintf('%f %f\n',x0,x1);

Citation pour cette source

Arthur Matlabus (2026). Newtons Method (https://fr.mathworks.com/matlabcentral/fileexchange/167361-newtons-method), MATLAB Central File Exchange. Extrait(e) le .

Add the first tag.

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0