% mfile.m
% 96/05/26
%
% Euler's method for model problem y'=t+y y(0)=1
%

   v=1;
   N=input('Enter number of intervals: ');
   for i=1:N
     t=(i-1)/N;
     v=v+(1/N)*(t+v);
   end; 
   error=2*exp(1)-2-v;
   fprintf('Final Answer: %e \n',v);
   fprintf('Error: %e \n',error);
