Mercurial > hg > octave-lyh
comparison scripts/statistics/distributions/binornd.m @ 10525:3306cfcb856e
Replace constructs like "NaN * one()" with "NaN()" and "Inf * ones ()" with "Inf()"
author | David Bateman <dbateman@free.fr> |
---|---|
date | Fri, 16 Apr 2010 10:32:07 +0200 |
parents | eb63fbe60fab |
children | 95c3e38098bf |
comparison
equal
deleted
inserted
replaced
10524:1c6ff93c025a | 10525:3306cfcb856e |
---|---|
75 endif | 75 endif |
76 | 76 |
77 if (isscalar (n) && isscalar (p)) | 77 if (isscalar (n) && isscalar (p)) |
78 if (find (!(n >= 0) | !(n < Inf) | !(n == round (n)) | | 78 if (find (!(n >= 0) | !(n < Inf) | !(n == round (n)) | |
79 !(p >= 0) | !(p <= 1))) | 79 !(p >= 0) | !(p <= 1))) |
80 rnd = NaN * ones (sz); | 80 rnd = NaN (sz); |
81 elseif (n == 0) | 81 elseif (n == 0) |
82 rnd = zeros (sz); | 82 rnd = zeros (sz); |
83 else | 83 else |
84 nel = prod (sz); | 84 nel = prod (sz); |
85 tmp = rand (n, nel); | 85 tmp = rand (n, nel); |