Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %rand rozklad rownomierny
- %randn rozklad normalny
- %r = a + (b-a).*rand(); od a do
- %(b-a) a mean b variance
- %u=m+sqrt(v)*randn(n,1)
- %gives n independent normals with mean
- %m and variance v.
- %stats = [mean(y) std(y) var(y)]
- a=rand(1,100);
- b=5+5.*rand(1,100);
- nordisa=0+sqrt(1).*randn(1,100);
- nordisb=3+sqrt(10).*randn(1,100);
- subplot(2,2,1)
- hist(a);
- subplot(2,2,2)
- hist(b);
- subplot(2,2,3)
- hist(nordisa);
- subplot(2,2,4)
- hist(nordisb);
- hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement