File Exchange

image thumbnail

Error Propagation

version 1.4 (2.07 KB) by

Numerically calculates uncertainties of a function using random numbers to simulate function inputs

11 Downloads

Updated

View License

Numerically calculates uncertainties for a function where the variables' means and uncertainties are given.

Arguments are i) function (either an inline function or proper m-file), ii) the mean values for each variable and iii) the uncertainties for each variable.

If requested, also shows a histogram plot.

Also gives skew and kurtosis values

Comments and Ratings (4)

Stephan Koehler

You would expect different values because it uses random numbers

Vali

Vali (view profile)

Sorry for spamming, but if I do this:

func = @(x1,x2) x1.*x2;
[~, sig_f] =error_propagation( func, 1,1,0.5,0.5, 'hist')

I get sig_f = 0.7513, but it should be sqrt(0.5), am I doing something wrong?

Vali

Vali (view profile)

Why is it that if I run this function with the same parameters it gives me slightly different values, each time I run it?
Otherwise great function!

Kresten

Updates

1.4

typo in line 74.

1.2

bug fixes

1.1

Updated the script to make inputs more intuitive.

MATLAB Release
MATLAB 5.2 (R10)

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

» Watch video