Mercurial > hg > octave-lyh
diff scripts/polynomial/polyfit.m @ 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 | 614505385171 |
children | 72c96de7a403 |
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;