komputasi (secant)

Download Komputasi (Secant)

If you can't read please download the document

Upload: viki-wulandari

Post on 23-Oct-2015

7 views

Category:

Documents


4 download

TRANSCRIPT

clc; clear; disp('Program Metode Secant'); disp('============================='); E=0.0001; x0=input('Masukkan X0 :'); xb=input('Masukkan X1 :'); i=0; fx=x0^3-3*x0-20; fxb=xb^3-3*xb-20; d = xb - (fxb*(xb-x0)/(fxb-fx)); fd=d^3-3*d-20; M=abs(x0-xb);% M=9; disp('______________________________________________________________________________________________________'); disp(' i x0 xi f(x0) f(xi) xb f(xb) epsilon'); disp('______________________________________________________________________________________________________'); fprintf('%3.0f %12.6f %12.6f %12.6f %12.6f %12.6f %12.6f %12.6f\n',i,x0,xb,fx,fxb,d,fd,M); while E