Pseudorandom number generation for engineering estimates

バージョン 1.1 (4.58 KB) 作成者: Sky Sartorius
Tools for generating pseudorandom numbers, primarily geared toward making engineering estimates.
ダウンロード: 176
更新 2021/5/16

A tool for random number generation on a distribution, such as a triangular distribution or PERT distribution, is very convenient for making estimates for physical values in the real world. Scientists and engineers often make estimates or assumptions, but they are also able to bracket the estimate based on experience or physics. For example, in estimating the mass of a small object, a normal distribution centered at my best guess could result in negative mass, which is known to be impossible. A triangular distribution allows quick and simple characterization of values as "probably M, but definitely not less than A or more than B."

The formulations here have some features that make it easy to integrate this capturing of uncertainty into scripts.

Example: Based purely on guesstimates that include a best guess and intuitive upper/lower limits, how much do a dime, nickel, and quarter weigh together?

% First, create a function based on randt to conveniently define and generate "uncertain variables."
uvar = @(x) randt(x,[1e5,1]);

dime = uvar([1 1.5 3.5]); %Pretty light, but not less than a gram..."
nickel = uvar([3 5 6]);
quarter = uvar([5 8 10]);

total = dime + nickel + quarter;

histogram(total,'Normalization','pdf');

引用

Sky Sartorius (2024). Pseudorandom number generation for engineering estimates (https://github.com/sky-s/randx), GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2016a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersOil, Gas & Petrochemical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート
1.1

Added PERT distribution. Moved to GitHub repo.

1.0.0.0

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。