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

 


Go back to book Homepage Go back to book's matlab Homepage Go back to book's Chapter 1 Homepage

Copyright © 2001 Northstar Digital Design, Inc.