function y=pareto(n,a,b)
%PARETO Generate Pareto random numbers
%according to the inversion method.
x=rand(n,1);
for i=1:n,
   y1=1-x(i);
   y2=-(1/b)*(log(y1));
   y(i)=a*exp(y2);
end
  
