From octave-sources-request at bevo dot che dot wisc dot edu Fri Jun 13 19:40:42 2003 Subject: Re: polyfit.m patch From: Paul Kienzle To: "Pascal A. Dupuis" Cc: octave-sources at bevo dot che dot wisc dot edu Date: Fri, 13 Jun 2003 20:41:44 -0400 Pascal A. Dupuis wrote: >please find herewith enclosed a patch for m/polynomial/polyfit.m. >The goal is to also return the design matrix, that is, the matrix such >that yf = X*p. This permits to estimate the standard deviation on >the coefficients of p: let sy be the square of the standard deviation >between y and yf, then sigma_p = diag(sqrt(sy * inv(X.'*X))) > That is not compatible with the three argument return option of matlab's polyfit. Feel free to suggest alternative return values from wpolyfit in octave-forge which is not so constrained (and which already returns sigma_p). Paul Kienzle pkienzle at users dot sf dot net