% M495.3: Laboratory Three
% Darts
% Add your own comments explaining what this script file does.
% Hint: Does 3.14 remind you of anything?
%

clear
   close all
   clc
   
   rand('seed',.123456) 
   NumberInside = 0;
   Estimate = zeros(500,1);
   totalx = zeros(500*100,1);
   totaly = zeros(500*100,1);
   for k=1:500
      x = -1+2*rand(100,1);
      y = -1+2*rand(100,1);
      NumberInside = NumberInside + sum(x.^2 + y.^2 <= 1);
      Estimate(k) = (NumberInside/(k*100))*4;    
      totalx((k-1)*100+1:k*100) = x;
      totaly((k-1)*100+1:k*100) = y;
   end
   plot(Estimate)
   title('Your title');
   xlabel('Your xlabel')
   ylabel('Your ylabel')
