   close all
   
   m = 50;
   x = linspace(-1,1,m);
   exact = exp(x);
   
   
   figure
   k=0;
   y = zeros(1,m);
   for n = [4 8 16 20]
      for i=1:m
         y(i) = MyExpF(x(i),n);
      end
	  RelErr = abs(exact - y)./exact;
	  k=k+1;
	  subplot(2,2,k)
      plot(x,RelErr)
	  Title(sprintf('n = %2.0f',n))
   end
   pause
   
   
   figure
   RelErr = abs(exact - MyExp1(x')')./exact;
   plot(x,RelErr)
   Title('Relative Error in MyExp1')
   pause

   
   figure
   RelErr = abs(exact - MyExp2(x))./exact;
   plot(x,RelErr)
   Title('Relative Error in MyExp2')
   pause

   
   clc
   home
   disp(' Length(x)     MyExp1(x)     MyExp2(x) ')
   disp('                 Time           Time')
   disp('--------------------------------------------')
   for L = 50:50:300
      xL = linspace(-1,1,L);
      tstart = clock;
      y = MyExp1(xL);
	  tfinish = clock;
      t1 = etime(tfinish,tstart);
      tstart = clock;
      y = MyExp2(xL);
	  tfinish = clock;
      t2 = etime(tfinish,tstart);	 	 
      disp(sprintf('%6.0f  %13.2f  %13.2f  %13.2f  ',L,t1,t2))
   end
   pause
   
  

   
   figure
   RelErr = abs(exact - MyExp3(x')')./exact;
   plot(x,RelErr)
   Title('Relative Error in MyExp3')
   pause
 
   
   figure
   RelErr = abs(exact - MyExp4(x))./exact;
   plot(x,RelErr)
   Title('Relative Error in MyExp4')
   pause
 
   
   disp(' ')
   disp(' ')
   disp(' Length(x)     MyExp3(x)      MyExp4(x) ')
   disp('                 Flops          Flops')
   disp('---------------------------------------')
   for L = 50:50:300
      xL = linspace(-1,1,L);
	  flops(0);
      y = MyExp3(xL);
	  f3 = flops;
	  flops(0);
      y = MyExp4(xL);
	  f4 = flops;	 	 
      disp(sprintf('%6.0f  %13.0f  %13.0f  ',L,f3,f4))
   end
   
   
   
  
   
 
