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
You would expect different values because it uses random numbers
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?
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!
typo in line 74.
Updated the script to make inputs more intuitive.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.