How to make operator for random matrix(matlab command is randn) ? please help me
3 ビュー (過去 30 日間)
古いコメントを表示
How to make operator for random matrix(matlab command is randn) ? please help me
0 件のコメント
採用された回答
Star Strider
2014 年 5 月 4 日
編集済み: Star Strider
2014 年 5 月 4 日
If you want to create normally-distributed random variables with a standard deviation of s and a mean of m with randn, this will work:
nrmrnd = @(m,s) m + s*randn;
or if you want a row r by column c matrix of them:
nrmrnd = @(m,s,r,c) m + s*randn(r,c);
4 件のコメント
Star Strider
2014 年 5 月 4 日
This function should work:
xrndn = @(x) randn(length(x))*x(:);
Call it as:
y = xrndn(x);
for any vector x.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!