fit
Contents: Description, Arguments, Usage, Examples, Images Supported Under Version: >1.69 Current Davinci Version: 2.27 64-bit Safe: No
Description Least squares curve fitting
Arguments and Return Values Arguments: Two numeric arrays and fitting options Return Value: A numeric array containing the fitting coefficients
Usage Syntax: fit(y=VAL [, x=VAL] [, type=STRING] [, start = INT] [, steps = VAL] [, plot = INT] [, verbose = INT] [, ignore = VAL]) The fit() function performs a non-linear least-squares fit to a data set, using the user specified function type. Currently, only the following six functions are implemented:
The fit() function uses an iterative method to find the best fit, however by default, only one iteration is performed. The user can specify a larger number of iterations with the 'steps' parameter, or the fit() function can be called repeatedly, using the return values from the previous call as the start parameter for the next call. If no start parameter is specified, or any of the start parameters are zero, fit() makes a guess based on the function selected and the actual data values. (The marquant-levy fitting method can not handle zero coefficients.) If the X data values are not specified, channels are used instead, starting at 0. If type is not specified, it defaults to linear. The fit() function returns an array of DOUBLEs containing the function coefficients, the chi-squared 'goodness-of-fit' value, and the alamda necessary for the next iteration. The order of these values is defined by the function type selected. The returned coefficients array is suitable for use as the start values for another iteration of the fit() function. If the plot keyword is given and is non-null, then the data, and the fitted function are plotted.
Examples dv> a 100x100x1 array of float, bsq format [40,000 bytes] dv> b 100x100x1 array of float, bsq format [40,000 bytes] dv> fit=fit(y=a,x=b,type="linear",plot=1) 2x1x1 array of double, bsq format [16 bytes] 6.08734e-05 0.509038
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Recent Core Changes Modified On: 05-04-2016 |