From bug-request at octave dot org Mon Jan 31 17:34:33 2005 Subject: FW: polyderiv problem? From: Joe Koski To: "bug at octave dot org" Date: Mon, 31 Jan 2005 15:27:08 -0600 John, Since I never heard from the list about this, I'll assume that this is a possible bug in octave. Obviously, it is not urgent since a workaround exists. In general, I hate the polynomial fitting approach, but it was forced on me by a group that thinks that it is a great idea. Joe ------ Forwarded Message From: Joe Koski Date: Fri, 28 Jan 2005 12:57:24 -0700 To: Octave Help Subject: polyderiv problem? When doing a larger script, I had this problem. Here is the short version of what happened. If I run the simple script: function run_poly_test x = [1:5] y = rand(1,5) n=3 [coeff,mat] = polyfit(x,y,n); coeff d_coeff1 = polyderiv(coeff') d_coeff2 = polyderiv(coeff) I get the following output: octave:4> run_poly_test x = 1 2 3 4 5 y = 0.15180 0.69255 0.77507 0.26829 0.58182 n = 3 coeff = 0.10655 -1.03346 3.00537 -1.94867 d_coeff1 = 0.31964 -2.06693 3.00537 error: product: nonconformant arguments (op1 is 3x1, op2 is 1x3) error: evaluating binary operator `.*' near line 91, column 20 error: evaluating assignment expression near line 91, column 5 error: called from `polyderiv' in file `/usr/local/share/octave/2.1.64/site/m/octave-forge/FIXES/polyderiv.m' error: evaluating assignment expression near line 8, column 10 error: called from `run_poly_test' in file `/Users/jakoski/Codes/octave test files/run_poly_test.m' octave:4> In other words, I need to transpose the output coefficients from polyfit into a row vector before they will work with polyderiv. This is on a Mac running OS X 10.3.7 with octave 2.1.64. Is this a MATLAB compatibility "feature," a bug, or am I missing something? Joe ------ End of Forwarded Message ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------