Advertisement
Ch4osCosmo

240 bribe

May 12th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function [sample] = generateNormalValrs(n,mu,sigma)
  2. switch nargin
  3. case 1 %good input
  4. mu=1.1;
  5. sigma=1.1;
  6. sample=sigma.*randn(1,n)+mu;
  7. case 2 %good input
  8. sigma=1.1;
  9. sample=sigma.*randn(1,n)+mu;
  10. case 3
  11. sample=sigma.*randn(1,n)+mu;
  12. otherwise
  13. error('enter a either 1,2 or 3 arguments');
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement