N = 1234;
minx = -78.3; maxx = 1017.88;
miny = -pi; maxy = pi;
X = rand(1,N) * (maxx - minx) + minx;
Y = rand(1,N) * (maxy - miny) + miny;
z = sqrt(-ln(X)) .* cos(2*pi*Y);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!