comparison scripts/statistics/distributions/geornd.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 3306cfcb856e
children be55736a0783
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
41 error ("geornd: c must be a positive integer"); 41 error ("geornd: c must be a positive integer");
42 endif 42 endif
43 sz = [r, c]; 43 sz = [r, c];
44 44
45 if (any (size (p) != 1) && ((length (size (p)) != length (sz)) || 45 if (any (size (p) != 1) && ((length (size (p)) != length (sz)) ||
46 any (size (p) != sz))) 46 any (size (p) != sz)))
47 error ("geornd: p must be scalar or of size [r, c]"); 47 error ("geornd: p must be scalar or of size [r, c]");
48 endif 48 endif
49 elseif (nargin == 2) 49 elseif (nargin == 2)
50 if (isscalar (r) && (r > 0)) 50 if (isscalar (r) && (r > 0))
51 sz = [r, r]; 51 sz = [r, r];
54 else 54 else
55 error ("geornd: r must be a positive integer or vector"); 55 error ("geornd: r must be a positive integer or vector");
56 endif 56 endif
57 57
58 if (any (size (p) != 1) && ((length (size (p)) != length (sz)) || 58 if (any (size (p) != 1) && ((length (size (p)) != length (sz)) ||
59 any (size (p) != sz))) 59 any (size (p) != sz)))
60 error ("geornd: n must be scalar or of size sz"); 60 error ("geornd: n must be scalar or of size sz");
61 endif 61 endif
62 elseif (nargin == 1) 62 elseif (nargin == 1)
63 sz = size(n); 63 sz = size(n);
64 elseif (nargin != 1) 64 elseif (nargin != 1)