Curve Fitting for Physics Students

Live script exploring the theory, practice, and interpretation of fitting models to experimental data.

You are now following this Submission

This Live Script introduces the theory and practice of curve fitting for quantitative data analysis and interpretation of experiments. Designed for physics students with some exposure statistical concepts and probability distributions, it first introduces the statistical theory of measurement and methods of parameter estimation using the maximum likelihood principle and Bayesian updating. (Warning: multivariable calculus and elementary linear algebra are used and the exposition is somewhat dense and lengthy.) It then illustrates how to use the Curve Fitter App and such functions as polyfit, histfit, nlinfit, fitnlm, and fit as well as least squares methods to derive and interpret the model parameter estimates and uncertainties. The extraction and interpretation of the uncertainties is a bit arcane so the examples provided may serve as a reference. A simulation of one-dimensional ballistic motion including a systematic effect illustrates methods, procedures, consistency checks, and visualizations.
This interactive tutorial may interest students and educators of physics and related fields. 'Try this' suggestions and 'Challenges' are included for exploration and assessment.

Cite As

Duncan Carlsmith (2026). Curve Fitting for Physics Students (https://uk.mathworks.com/matlabcentral/fileexchange/175968-curve-fitting-for-physics-students), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.01

Added interactive_examples tag

1.0.0