How to generate bivariate random normally distributed 3d array?
古いコメントを表示
mu= [0 0]
sigma= [1 0.25; .25 1]
mvnrnd(mu,sigma,100)
I want to generate a 3-by-2-by-100 array which is normally distributed with given mu and sigma. Please help me how can I do this?
5 件のコメント
Torsten
2023 年 5 月 31 日
A two-dimensional random variable produces pairs of values as realizations (like the 100 pairs in your code).
Do you really think it's useful to put these pairs in the 2nd dimension of a 3d matrix ?
the cyclist
2023 年 5 月 31 日
I don't understand what the first dimension (with size 3 in your 3-by-2-by-100 array) is supposed to represent. As @Torsten points out, you have 100 sets of 2 parameters. Where does the 3 come in?
Torsten
2023 年 5 月 31 日
Maybe the OP want to generate 3 arrays of size ( 100 x 2 ).' :-)
John D'Errico
2023 年 5 月 31 日
Since the realizations of such a random variable are i.i.d., it is sort of irrelevant what the 1st and third diemsnions mean!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!