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

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