This is a brute force curve fitting algorithm that uses a multiple restart hill climbing approach.
In theory, it can fit any curve given by a mathematical model to a set of known points.
The user can easily create a new curve fitting model by simply creating a new function handle, for example, a linear model:
n_params = 2;
f = @(x, p) p(1)*x + p(2);
Common curve fitting models are already typed in for convenience (poly1, poly2, exp1, exp2, etc...).
For n_params > 4, expect the algorithm to struggle in computation times.
Note: the user only needs to modify the "main.m" file.
Carlos Souto (2022). Curve fitting using a multiple restart hill climbing method (https://www.mathworks.com/matlabcentral/fileexchange/75988-curve-fitting-using-a-multiple-restart-hill-climbing-method), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!