Curve Fitting Tool

Helps fitting any linear and non-linear model to your data.
Updated 25 Jun 2020

View License

This tool helps fitting any linear and non-linear model to your data. Example data and non-linear model are predefined for testing purposes. Finding the solution to the example should take less than a minute. R2, coefficients and the function are all printed on the Command Window. You can stop the fitting process anytime by pressing Ctrl + C.

Model is saved in f_max, function in fun_max and coefficient values in values_max.

Cite As

Miika Wallius (2024). Curve Fitting Tool (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with R2006a to R2020a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Unnecessary things and comments removed.


First comment changed.
Model update improved.
Example function changed back to custom.
Good solution is found even faster.


Plot options are added.
Example functions are added.
Other minor improvements are added.
Coefficient names are found automatically.
Example function is changed.
Good solution is found faster.