Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. %rand rozklad rownomierny
  2. %randn rozklad normalny
  3. %r = a + (b-a).*rand(); od a do
  4. %(b-a) a mean b variance
  5. %u=m+sqrt(v)*randn(n,1)
  6. %gives n independent normals with mean
  7. %m and variance v.
  8. %stats = [mean(y) std(y) var(y)]
  9. a=rand(1,100);
  10. b=5+5.*rand(1,100);
  11. nordisa=0+sqrt(1).*randn(1,100);
  12. nordisb=3+sqrt(10).*randn(1,100);
  13. subplot(2,2,1)
  14. hist(a);
  15. subplot(2,2,2)
  16. hist(b);
  17. subplot(2,2,3)
  18. hist(nordisa);
  19. subplot(2,2,4)
  20. hist(nordisb);
  21. hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement