Mercurial > hg > octave-terminal
changeset 14110:b8d9530e940e stable
undo non-documentation changes in changeset 614505385171
* polyfit.m: Undo previous change.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 26 Dec 2011 10:17:47 -0500 |
parents | 9627d5134a12 |
children | dac62c415e8b c5222658dc3c |
files | scripts/polynomial/polyfit.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/polynomial/polyfit.m +++ b/scripts/polynomial/polyfit.m @@ -81,6 +81,8 @@ error ("polyfit: N must be a non-negative integer"); endif + y_is_row_vector = (rows (y) == 1); + ## Reshape x & y into column vectors. l = numel (x); x = x(:); @@ -97,7 +99,7 @@ if (nargout > 1) yf = v*p; - if (isrow (y)) + if (y_is_row_vector) s.yf = yf.'; else s.yf = yf;