필터 지우기
필터 지우기

The command normrnd times a scalar

조회 수: 1 (최근 30일)
msh
msh 2015년 7월 12일
댓글: Walter Roberson 2015년 7월 12일
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

답변 (1개)

Walter Roberson
Walter Roberson 2015년 7월 12일
It is going to multiply by 1/100.
  댓글 수: 4
msh
msh 2015년 7월 12일
I see, I now got your point. All it matters for me is whether eta=normrnd(0,sigma/100) and eta=normrnd(0,sigma)/100 are equivalent. I thank you very much.
Walter Roberson
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 CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by