Generating truncated Normal random and pdf using makedist with fixed sigma.
1 回表示 (過去 30 日間)
古いコメントを表示
I am finding it difficult to even describe my doubt may be someone get a clue from the code. I want to generate Truncated Normal Random number from a distribution, for that purpose I have to define a pd . I can define mu and sigma for a pd, but what if I only want to define sigma only and want to provide mu as input every time. The following is not working for me:
MU{1} = 0.015;
MU{2} = 0.0001;
SIGMA{1} = 0.0001;
SIGMA{2} = 0.00005;
pd{1} = @(x) makedist('Normal', 'mu', x, 'sigma', SIGMA{1});
pd{2} = @(x) makedist('Normal', 'mu', x, 'sigma', SIGMA{2});
jumpRandX{1} = random(pd{1}, MU{1},[200, 1]);
jumpRandX{2} = random(pd{2}, MU{2},[200, 1]);
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!