Mercurial > hg > octave-nkf
diff scripts/specfun/factor.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/specfun/factor.m +++ b/scripts/specfun/factor.m @@ -20,9 +20,9 @@ ## @deftypefn {Function File} {@var{p} =} factor (@var{q}) ## @deftypefnx {Function File} {[@var{p}, @var{n}] =} factor (@var{q}) ## -## Return prime factorization of @var{q}. That is, +## Return prime factorization of @var{q}. That is, ## @code{prod (@var{p}) == @var{q}} and every element of @var{p} is a prime -## number. If @code{@var{q} == 1}, return 1. +## number. If @code{@var{q} == 1}, return 1. ## ## With two output arguments, return the unique primes @var{p} and ## their multiplicities. That is, @code{prod (@var{p} .^ @var{n}) == @@ -52,7 +52,7 @@ x = q; n = 1; return; - endif + endif x = []; ## There is at most one prime greater than sqrt(q), and if it exists,