View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Propagation of Uncertainty

5.0 | 7 ratings Rate this file 76 Downloads (last 30 days) File Size: 1.63 KB File ID: #17901 Version: 1.3
image thumbnail

Propagation of Uncertainty



06 Dec 2007 (Updated )

Returns the propagated uncertainty in a function F imparted to it from its variables

| Watch this File

File Information

(UPDATE: Feel free to use this code, but I have written another much better code here:
Handy little function, for those of you in lab classes where they are sticklers for error. (or for those of you that are actual scientists even...!).

Propagation of uncertainty is a really slick formula, but its a massive pain to do by hand. this function does it for you!

To do it, just enter in the symbolic function, a row vector of the variables, a row vector for the estimated values of those variables, and lastly a row vector of the uncertainty associated with those variables.
help PropError has an example in it.
outputs both actual error, and the percent error.

The program follows the equation shown in the screenshot. (courtesy of Wikipedia).
Requires Symbolic Math Toolbox.


This file inspired Worst Case Propagation Of Uncertainty.

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 7.1.0 (R14SP3)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
17 Mar 2015 Francesco Ghini

I have a complicated experimental function, where I have to perturb two variables at the same time to simulate accuracy (rather than precision).

Is it possible with PropError?

Thank you in advance

22 Nov 2013 Deepak Ramaswamy

@Konstantinos, It seems this should fix display.
res = PropError(...);
res{1,1} = double(res{1,1});
res{2,3} = double(res{2,3})

14 Nov 2013 Konstantinos

thanks for your script.

I have a problem though. When I run the script, it does not return the result of the function nor the error in percentage.
Here is what i get:

[1x1 sym] '+/-' [3.1719e-04]
'Percent Error' '+/-' [1x1 sym]

so, instead of getting the values, i get the [1x1 sym].

Can you please help me understand why this is happening ? Is the first time i am using the Symbolic Math Toolbox.

Comment only
05 Feb 2013 Rhys

Rhys (view profile)

Very Nice! Very helpful for my Modern Physics lab!

09 Apr 2012 xiong

xiong (view profile)

So simple and useful, Thank you

15 Mar 2012 Marcus

Marcus (view profile)

18 Sep 2011 sixie yu

Help me solve the physic experimental uncertainty.

15 Oct 2010 Arne

Arne (view profile)

Simple, accurate and powerful. Just what I needed. Thank you

09 Feb 2010 1.2

changed the bsd license thingie, and fixed the help comments in my m-file.

17 Oct 2014 1.3

linked to my new, better worstcase code

Contact us