Mercurial > hg > octave-lyh
changeset 12481:97d103fcb6dd
polynomial/polyval.m: Minor simplification in polynomial evaluation
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 26 Feb 2011 16:07:52 -0500 |
parents | 139f993936af |
children | 3244c6e0af4a |
files | scripts/ChangeLog scripts/polynomial/polyval.m |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2011-02-26 Robert T. Short <octave@phaselockedsystems.com> + + * polynomial/polyval.m: Minor simplification in polynomial evaluation. + 2010-02-22 Rik <octave@nomad.inbox5.com> * general/bitcmp.m, general/bitget.m, general/bitset.m,
--- a/scripts/polynomial/polyval.m +++ b/scripts/polynomial/polyval.m @@ -69,11 +69,10 @@ n = length (p) - 1; x = (x - mu(1)) / mu(2); - y = p(1) * ones (size (x(:))); + y = p(1) * ones (size (x)); for i = 2:n+1 - y = y .* x(:) + p(i); + y = y .* x + p(i); endfor - y = reshape (y, size (x)); if (nargout == 2) ## Note: the F-Distribution is generally considered to be single-sided.