The command normrnd times a scalar
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I would like to know how Matlab understands the following:
eta=normrnd(0,sigma)/100
Is this command going to re-scale eta by 100 or multiply the normrnd(0,sigma) by 1/100 and therefore the variance is (sigma/100)^(2)
Can somone clarify this point for me ?
Many thanks
0 件のコメント
回答 (1 件)
Walter Roberson
2015 年 7 月 12 日
It is going to multiply by 1/100.
4 件のコメント
Walter Roberson
2015 年 7 月 12 日
normrnd is randn() * sigma + mu. Your mu is 0, so your normrnd() calls are randn() * sigma . It then does not matter if you pass sigma/100 or if you divide the result of the normrnd() by 100.
If the mu was not 0 then the two situations would not be the same.
参考
カテゴリ
Help Center および 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!