Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for a=1:7
- N=10^a;
- X=rand(1,N);
- Y=rand(1,N);
- Z=sqrt(-2.*log(X)).*cos(2.*pi.*Y);
- Normal_distribution = normrnd(0,1,N,1);
- figure(a)
- subplot(2,1,1); histogram(Z);
- subplot(2,1,2); histfit(Normal_distribution)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement