random number generator for linear distribution

バージョン 1.0.0.0 (1.45 KB) 作成者: Samuel Cheng
Random number generator for linear distribution.
ダウンロード: 1.3K
更新 2005/4/11

ライセンスの表示

Return random variable(s) with linear distribution within [0,1] and 0 outside; m specifies the slope

In other word
P(x)= mx+b if 0<=x<=1
P(x)= 0 otherwise

where b=1-m/2 as int P(x) should be 1

Usage: ran=randl(m,SIZE)

E.g. X=randl(1,[20,20])
X is matrix with size [20,20] and with distribution
p(x)=x+0.5 if 0<=x<=1 and p(x)=0 otherwise

引用

Samuel Cheng (2024). random number generator for linear distribution (https://www.mathworks.com/matlabcentral/fileexchange/7395-random-number-generator-for-linear-distribution), MATLAB Central File Exchange. 取得済み .

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

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0