normally random number generator with limited zone

조회 수: 1 (최근 30일)
milad babaei
milad babaei 2011년 2월 25일
tnx in advance, i have 3 random variables.that every of that 3 related to a another(*) one(of course)its random too.i use normal distribution generator for monte carlo simulation in matlab to produce RAndom number.but in some cases with mention to unlimited zone of generating random number my final data(*)will be negative.that is not accurate and unexplainable for my job(bearing capacity-geotechnical eng.)i choose normally dist. because its the best match for my data and bell type format of its distribution also help me and i have to use it..also i need to generate positive random number with this normal dist.i think i should find a way to limit this generator to produce random number between -1 & 1 or even find a way to use this distribution with desirable mean and standard deviation..
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 5월 29일
This question duplicates http://www.mathworks.com/matlabcentral/answers/2028-normal-random-number-generator-with-specified-zone

댓글을 달려면 로그인하십시오.

채택된 답변

Bruno Luong
Bruno Luong 2011년 2월 25일
This function will generate a normal distribution conditional by bounds:
http://www.mathworks.com/matlabcentral/fileexchange/23832-truncated-gaussian
  댓글 수: 10
milad babaei
milad babaei 2011년 3월 2일
I mean if i have three variable c,g,fi that each of them has e relation like this q:F(c,g,fi)...so i need to use a for loop to provide the distribution of q
milad babaei
milad babaei 2011년 3월 3일
if i want to use this new code(with peakpos) on that original m_file,where should i change??in which line???plz help mee

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Manu R
Manu R 2011년 2월 25일
You should not choose a probability distribution and then restrict its range. It leads to all sorts of problems with your measures of randomness (higher order moments) being flawed later.
I suggest you pick a non-negative distribution that resembles the Gaussian on the positive scale. I'd point you to the Exponential distribution and the Nakagami distribution to start your research on, solely based on your description so far.
Then, you can use the Normal distribution to generate numbers for these other distributions through an inverse transform.
  댓글 수: 1
milad babaei
milad babaei 2011년 2월 26일
hi
tnx for your guidance...in other words i need to Generate values from the normal distribution on the interval [a, b].

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by