Hi Gregory I'm no expert, but I have done some work with this function. The coeffs for your example are in [c b a] ordering - i.e., from lowest to highest order. The yfit array contains the computed y-value for each of the x-values you provided, in the same order as the $x array.
HTH Ralph On Aug 16, 2011, at 5:58 PM, Gregory Petropoulos wrote: > Hello, > > I am fairly new to PDL and I have gotten the fitpoly1d routine working > (PDL::Fit::Polynomial). Unfortunately I have not found any documentation on > what the output is. I am calling the function as follows: > > ($yfit, $coeffs)=fitpoly1d $x, $y, 3 > > The goal is to fit some data to a quadratic. The output I get looks like: > $yfit=[# # # #] > $coeffs=[# # #] > > It is not obvious to me from the description on CPAN or the PDL documentation > what the values in $yfit are. Also it is not obvious what order it is > returning the coefficients in. For the above example the coefficients are > a*x^2+b*x+c, however I don't know if the coefficients are [a b c] or [c b a] > or something else entirely. > > If you have any knowledge about the output of this function please let me > know. > > Thank you, > > -- > Gregory Petropoulos > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
