Linfit.pm (PDL-2.074) | : | Linfit.pm (PDL-2.075) | ||
---|---|---|---|---|

skipping to change at line 75 | skipping to change at line 75 | |||

=for sig | =for sig | |||

Signature: (xdata(n); ydata(n); $fitFuncs(n,order); [o]yfit(n); [o]coeffs(orde r)) | Signature: (xdata(n); ydata(n); $fitFuncs(n,order); [o]yfit(n); [o]coeffs(orde r)) | |||

Uses a standard matrix inversion method to do a least | Uses a standard matrix inversion method to do a least | |||

squares/min chi^2 fit to data. | squares/min chi^2 fit to data. | |||

Returns the fitted data and optionally the coefficients. | Returns the fitted data and optionally the coefficients. | |||

One can thread over extra dimensions to do multiple fits (except | One can broadcast over extra dimensions to do multiple fits (except | |||

the order can not be threaded over - i.e. it must be one fixed | the order can not be broadcasted over - i.e. it must be one fixed | |||

set of fit functions C<fitFuncs>. | set of fit functions C<fitFuncs>. | |||

The data is normalised internally to avoid overflows (using the | The data is normalised internally to avoid overflows (using the | |||

mean of the abs value) which are common in large polynomial | mean of the abs value) which are common in large polynomial | |||

series but the returned fit, coeffs are in | series but the returned fit, coeffs are in | |||

unnormalised units. | unnormalised units. | |||

=for example | =for example | |||

# Generate data from a set of functions | # Generate data from a set of functions | |||

End of changes. 1 change blocks. | ||||

2 lines changed or deleted | | 2 lines changed or added |