Mercurial > hg > octave-nkf
changeset 5158:955ed0dcdc5f
[project @ 2005-02-23 00:40:57 by jwe]
author | jwe |
---|---|
date | Wed, 23 Feb 2005 00:40:57 +0000 |
parents | 8ca032643f55 |
children | f0f3ccba4388 |
files | scripts/ChangeLog scripts/polynomial/poly.m scripts/polynomial/residue.m |
diffstat | 3 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,10 @@ +2005-02-22 John W. Eaton <jwe@octave.org> + + * polynomial/residue.m: Force prepad to always create row vectors. + + * polynomial/poly.m: Quick return if m is 0. + From Carmen Navarrete <carmen.navarrete@uam.es>. + 2005-02-21 David Bateman <dbateman@free.fr> * statistics/distributions/poisson_rnd.m: fix for lambda of zero.
--- a/scripts/polynomial/poly.m +++ b/scripts/polynomial/poly.m @@ -40,6 +40,7 @@ n = max (size (x)); if (m == 0) y = 1; + return; elseif (m == 1) v = x; elseif (m == n)
--- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -294,7 +294,7 @@ else cp = p (1:mpi-1); endif - rhs (1, rhi:rhi+lp-1) = prepad (poly (cp), lp); + rhs (1, rhi:rhi+lp-1) = prepad (poly (cp), lp, 0, 2); rhi = rhi + lp; endfor mpi = mpi + M (dpi); @@ -302,11 +302,11 @@ endwhile if (MM > 1) for index = 2:MM - lhs (index, :) = prepad (polyderiv (lhs (index-1, :)), lb); + lhs (index, :) = prepad (polyderiv (lhs (index-1, :)), lb, 0, 2); ind = 1; for rhi = 1:lp cp = rhs (index-1, ind:ind+lp-1); - rhs (index, ind:ind+lp-1) = prepad (polyderiv (cp), lp); + rhs (index, ind:ind+lp-1) = prepad (polyderiv (cp), lp, 0, 2); ind = ind + lp; endfor endfor