Contoh Program Bisection sederhana	i	x(i)	
% Mencari akar persamaan x2 - x - 6 = 0 di antara x=2 dan x=5

a=2;
b=5;
for i=1:100
 fa=a^2-a-6;
 fb=b^2-b-6;
 c=(a+b)/2;
 x(i)=c
 k(i)=i
 fc=c^2-c-6;
 if (abs(fc))<0.000001
   break
 end
 if fa*fc<0
   b=c;
 else
   a=c;
 end
end
plot (k,x), grid on	     1	    3.5000	
	     2	    2.7500	
	     3	    3.1250	
	     4	    2.9375	
	     5	    3.0313	
	     6	    2.9844	
	     7	    3.0078	
	     8	    2.9961	
	     9	    3.0020	
	    10	    2.9990	
	    11	    3.0005	
	    12	    2.9998	
	    13	    3.0001	
	    14	    2.9999	
	    15	    3.0000	
	    16	    3.0000	
	    17	    3.0000	
	    18	    3.0000	
	    19	    3.0000	
	    20	    3.0000	
	    21	    3.0000	
	    22	    3.0000	
	    23	    3.0000	

k =

  Columns 1 through 12 

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12

  Columns 13 through 23 

    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23

x =

  Columns 1 through 7 

    3.5000
    2.7500
    3.1250
    2.9375
    3.0313
    2.9844
    3.0078

  Columns 8 through 14 

    2.9961
    3.0020
    2.9990
    3.0005
    2.9998
    3.0001
    2.9999

  Columns 15 through 21 

    3.0000
    3.0000
    3.0000
    3.0000
    3.0000
    3.0000
    3.0000

  Columns 22 through 23 

    3.0000
    3.0000