Monday, 3 April 2017

MATLAB Code 3rd Apr

fx='x^3 - x -11'
xa=2
xb=3
xc = ( xa + xb ) / 2
x=xa
fxa=eval(fx)
x=xc
fxc=eval(fx)
if fxa * fxc < 0
    xb = xc;
else
    xa = xc;
   
end

xa , xb , xc , fx , fxa


in command window 

<file name>

format long 
<file name>