Weighted Nonlinear Curve Fit Script with Plotter

Version (8.4 KB) by Jannick
This curve fitting script calculates best guess and errors using data with y-error. Plot see preview
Updated 19 Mar 2012

View License

This weighted nonlinear fit script fulfills the requirements of physicists, chemists and other quantative scientists, who need a fitting script for the everyday use. This script fits and creates nice plots with results and data automatically printed in a legend. It saves much time compared to using origin or other fitting programs.

It uses built in minimization routines to obtain the best guess for the fit variables. The error is determined by adding some value x (depending on how many variables are fitted) to the minimum chi^2 value and finding the value of the respective fitting variable so that chi^2 is equal to min(chi^2)+x.

Cite As

Jannick (2024). Weighted Nonlinear Curve Fit Script with Plotter (https://www.mathworks.com/matlabcentral/fileexchange/35565-weighted-nonlinear-curve-fit-script-with-plotter), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Linear and Nonlinear Regression in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

example added

rounding on n significant digits (default n=2)

new options like change of header

minor bug fixes