Mercurial > octave-nkf
changeset 17725:3f02bcf2bdcc
ppval.m: ensure consistency in the shape of intermediate interpolated matrix between "nearest" and higher order methods.
* scripts/polynomial/ppval.m: Use same reshape call in "nearest" as in other
methods so output is consistent for ppval.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Fri, 10 May 2013 13:34:31 +0200 |
parents | f0bc865db55f |
children | d449f4668b72 |
files | scripts/polynomial/ppval.m |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/polynomial/ppval.m Tue Oct 22 08:34:23 2013 -0700 +++ b/scripts/polynomial/ppval.m Fri May 10 13:34:31 2013 +0200 @@ -74,9 +74,10 @@ dx = shiftdim (dx, ndv - 1); ## Use Horner scheme. - yi = Pidx; if (k > 1) yi = shiftdim (reshape (Pidx(1,:), dimvec), ndv - 1); + else + yi = shiftdim (reshape (Pidx, dimvec), ndv - 1); endif for i = 2 : k;