Professional Documents
Culture Documents
Clear
Clc
Function f=f(x)
F=x^3-x-1
Endfunction
If f(a)*f(b)<0 then
Printf(“n \t c \t f©\n”)
For i=1:n
C=(a+b)/2
If f(a)*f(c)<0
B=c
Else
A=c
End
C1=(a+b)/2
If abs(c-c1)<=10^(-e-1)
Break
End
End
Else
End