diff scripts/statistics/distributions/nbinrnd.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 16f53d29049f
children 95c3e38098bf
line wrap: on
line diff
--- a/scripts/statistics/distributions/nbinrnd.m
+++ b/scripts/statistics/distributions/nbinrnd.m
@@ -77,7 +77,7 @@
 
   if (isscalar (n) && isscalar (p))
     if ((n < 1) || (n == Inf) || (n != round (n)) || (p <= 0) || (p > 1));
-      rnd = NaN * ones (sz);
+      rnd = NaN (sz);
     elseif ((n > 0) && (n < Inf) && (n == round (n)) && 
 	    (p > 0) && (p <= 1))
       rnd = randp ((1 - p) ./ p .* randg (n, sz));