MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > a random number obeying Gaussian + within a range 

Subject: a random number obeying Gaussian + within a range From: hailiang shen Date: 18 Apr, 2009 23:18:02 Message: 1 of 16 
Dear friends, 
Subject: a random number obeying Gaussian + within a range From: John D'Errico Date: 18 Apr, 2009 23:30:04 Message: 2 of 16 
"hailiang shen" <hlshen2005@gmail.com> wrote in message <gsdn3a$g84$1@fred.mathworks.com>... 
Subject: a random number obeying Gaussian + within a range From: TideMan Date: 18 Apr, 2009 23:35:29 Message: 3 of 16 
On Apr 19, 11:18=A0am, "hailiang shen" <hlshen2...@gmail.com> wrote: 
Subject: a random number obeying Gaussian + within a range From: hailiang shen Date: 18 Apr, 2009 23:44:02 Message: 4 of 16 
Thanks John. My actual problem is this: my physical parameter is meaningless for negative values, however, from literature, the distribution of this parameter is Gaussian distribution. 
Subject: a random number obeying Gaussian + within a range From: hailiang shen Date: 18 Apr, 2009 23:49:02 Message: 5 of 16 
Thanks for all your replies. 
Subject: a random number obeying Gaussian + within a range From: Roger Stafford Date: 19 Apr, 2009 01:03:03 Message: 6 of 16 
"hailiang shen" <hlshen2005@gmail.com> wrote in message <gsdn3a$g84$1@fred.mathworks.com>... 
Subject: a random number obeying Gaussian + within a range From: Roger Stafford Date: 19 Apr, 2009 01:30:04 Message: 7 of 16 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gsdt87$ifj$1@fred.mathworks.com>... 
Subject: a random number obeying Gaussian + within a range From: Bruno Luong Date: 19 Apr, 2009 09:32:01 Message: 8 of 16 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gsdt87$ifj$1@fred.mathworks.com>... 
Subject: a random number obeying Gaussian + within a range From: Matt Date: 19 Apr, 2009 13:15:03 Message: 9 of 16 
"hailiang shen" <hlshen2005@gmail.com> wrote in message <gsdok2$m0i$1@fred.mathworks.com>... 
Subject: a random number obeying Gaussian + within a range From: Bruno Luong Date: 19 Apr, 2009 13:30:04 Message: 10 of 16 
Here is a function generating truncated Gaussin with correct standard deviation: 
Subject: a random number obeying Gaussian + within a range From: Bruno Luong Date: 19 Apr, 2009 13:44:01 Message: 11 of 16 
Obviously this distribution is "popular" enough to be documented in Wikipedia. 
Subject: a random number obeying Gaussian + within a range From: Bruno Luong Date: 19 Apr, 2009 15:11:01 Message: 12 of 16 
I add few modifications to make the function more stable: 
Subject: a random number obeying Gaussian + within a range From: hailiang shen Date: 20 Apr, 2009 18:50:17 Message: 13 of 16 
Thanks for your entire replay, I get the new term 'truncated Gaussian distribution', and excellent code to implement them. 
Subject: a random number obeying Gaussian + within a range From: hailiang shen Date: 21 Apr, 2009 18:55:02 Message: 14 of 16 
I am confused by one term: a truncated normal distribution with a mean 0.075 and standard deviation 1. The (0.075, 1) may be of two cases: 
Subject: a random number obeying Gaussian + within a range From: Bruno Luong Date: 21 Apr, 2009 19:33:01 Message: 15 of 16 
"hailiang shen" <hlshen2005@gmail.com> wrote in message <gsl4q6$g3n$1@fred.mathworks.com>... 
Subject: a random number obeying Gaussian + within a range From: Zack Date: 16 Aug, 2011 11:16:13 Message: 16 of 16 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gsfeu5$7oa$1@fred.mathworks.com>... 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.