How to create Gauss noise within the interval
이전 댓글 표시
I have an interval with lower boundary at a = -0.005 and upper boundary b = 0.005. I need to create the Gauss white noise within this interval. For uniformly distributed pseudorandom numbers (generated by rand) it is clear e.g.:
r = a + (b-a).*rand(100,1);
however it does not work for randn function.I need some way how to produce the Gaussian noise in given interval. Is there any way how to do it?
thanks
채택된 답변
추가 답변 (2개)
Daniel Shub
2013년 9월 17일
2 개 추천
What you are looking for is typically called a Truncated Gaussian. There is a highly rated FEX:submission
Laurent
2013년 9월 17일
2 개 추천
This is not possible, since the output of randn can be in principle any value between -Inf and +Inf.
Depending on what you want you could set the width of the gaussian to a reasonable value (for example sigma=0.005) and then later clip values outside of your interval to the border values.
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!