Generalized Uncertainty Propagation
Why
In PHYS 159 labs, every quantity we calculated from measured values carried those values’ uncertainty. Propagating it by hand for each new formula was tedious and easy to get wrong, so I wrote a MATLAB live script that does it for any function.
The theory
A function of measured quantities , each with uncertainty , has uncertainty
All of those partial derivatives fit neatly into the Jacobian:
For this tool, the Jacobian is just a way to pull all the derivative information out of a function and put it in one matrix.
How it works
You give it a symbolic function, the measured values and their uncertainties. It computes the Jacobian with the Symbolic Math Toolbox, evaluates it at the measurements, and combines each partial derivative with its uncertainty using the formula above. The comments in the script go through each step.
Stack
MATLAB Live Script (.mlx) · Symbolic Math Toolbox