Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.21 KB | None | 0 0
  1. for a=1:7
  2. N=10^a;
  3. X=rand(1,N);
  4. Y=rand(1,N);
  5. Z=sqrt(-2.*log(X)).*cos(2.*pi.*Y);
  6. Normal_distribution = normrnd(0,1,N,1);
  7. figure(a)
  8. subplot(2,1,1); histogram(Z);
  9. subplot(2,1,2); histfit(Normal_distribution)
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement