Mercurial > hg > octave-lojdl
comparison scripts/statistics/distributions/chi2rnd.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 |
---|---|
64 print_usage (); | 64 print_usage (); |
65 endif | 65 endif |
66 | 66 |
67 if (isscalar (n)) | 67 if (isscalar (n)) |
68 if (find (!(n > 0) | !(n < Inf))) | 68 if (find (!(n > 0) | !(n < Inf))) |
69 rnd = NaN * ones (sz); | 69 rnd = NaN (sz); |
70 else | 70 else |
71 rnd = 2 * randg(n/2, sz); | 71 rnd = 2 * randg(n/2, sz); |
72 endif | 72 endif |
73 else | 73 else |
74 [retval, n, dummy] = common_size (n, ones (sz)); | 74 [retval, n, dummy] = common_size (n, ones (sz)); |