Error Propagation Class
This class, called "meas" (meaning measurement with uncorrelated error), contains two elements. A "meas" can be created with the constructor function:
>> d = meas();
and values can be assigned to the two elements.
>> d.value = 1;
>> d.error = .3;
The values can also be displayed:
>> d
1 +/- 0.3
I overloaded the +,-,*,/,^,>,<,==,>=,<= operators to perform the error propagation for each of these operators. The comparison operators work to within 1-sigma. For example, (1.0 +/- .3) == (.9 +/- .3) would return "true".
In this early version, this only works for single numbers, and just for the operators listed above. In the future, I plan to overload many common functions (sin(x) and such...), and make support for matrices and arrays. Comments and changes are most welcome, especially since this is my first Matlab code in which I have made my own class.
Thanks to Kevin Murphy's site,
http://www.cs.ubc.ca/~murphyk/Software/matlabObjects.html
for helpful basic information on writing a class.
Cita come
Sean Bryan (2025). Error Propagation Class (https://it.mathworks.com/matlabcentral/fileexchange/16606-error-propagation-class), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- Signal Processing > Signal Processing Toolbox > Digital and Analog Filters > Digital Filter Analysis >
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
@meas/
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 | I couldn't spell "propagation"...sad. At least the code works! |
