image thumbnail

Curve fitting using a multiple restart hill climbing method

version 1.0.0 (3.74 KB) by Carlos Souto
This is a brute force curve fitting algorithm that uses a multiple restart hill climbing approach.

74 Downloads

Updated 24 May 2020

View License

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.

Cite As

Carlos Souto (2021). 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
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!