Rank: 3068 based on 34 downloads (last 30 days) and 1 file submitted
Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Hu
Updated   File Tags Downloads
(last 30 days)
Comments Rating
06 Aug 2014 Screenshot 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu statistics, physics 34 5
  • 4.0
4.0 | 2 ratings
Comments and Ratings by Hu View all
Updated File Comments Rating
24 Jul 2014 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu

Hi ben,
Sorry that I can't reply soon enough. This issue might be due to the fact that your pdf spread quite narrow, and the code detect the probability to produce points beyond that region is lower than 1e-4, this is to make the code more efficient, however, you can modify line 68 and 73, to set this threshold smaller (however, the method I chose can't handle values smaller than eps.)
Y. Hu

17 Dec 2013 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu

Hi ben,
Sorry for the late reply. You're right about the expression for Gaussian distribution, however, you can easily generate a Gaussian PDF random number from the built-in random number generator, while my file is design specifically for PDFs that don't have a built-in generator. So I wrote an example of PDF in case that you don't know how to use the code and just execute it without any input arguments. One property of my code is that it can normalise the PDF automatically, so you don't need to worry about the normalisation constant.
Y. Hu

Comments and Ratings on Hu's Files View all
Updated File Comment by Comments Rating
06 Aug 2014 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu Tapiwa

Hi Hu,
I recently submitted code that does something related to this. Check out ArbRand

24 Jul 2014 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu Hu

Hi ben,
Sorry that I can't reply soon enough. This issue might be due to the fact that your pdf spread quite narrow, and the code detect the probability to produce points beyond that region is lower than 1e-4, this is to make the code more efficient, however, you can modify line 68 and 73, to set this threshold smaller (however, the method I chose can't handle values smaller than eps.)
Y. Hu

09 Jun 2014 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu thoraya, ben chattah

Hi Hu,
i need to generate a sample of 1-D random numbers in [-10,10] which follows the PDF of Levy distribution. So i use your code. The problem that the resulting values are in the new range [-3.9394,3.9394] but i want that these values are in the original range including xmin=-10 and xmax=10.can you help me please?
thank you

17 Dec 2013 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu Hu

Hi ben,
Sorry for the late reply. You're right about the expression for Gaussian distribution, however, you can easily generate a Gaussian PDF random number from the built-in random number generator, while my file is design specifically for PDFs that don't have a built-in generator. So I wrote an example of PDF in case that you don't know how to use the code and just execute it without any input arguments. One property of my code is that it can normalise the PDF automatically, so you don't need to worry about the normalisation constant.
Y. Hu

09 Nov 2013 1-D random number generation with any analytical expression probability density function Generate random numbers according to given analytical expression for the PDF Author: Hu thoraya, ben chattah

hi Hu,
just a question about your code:
the analytical expression for probability density distribution(PDF)of gaussian distribution is:exp(-(x - m).^2 ./ (2*sigma^2)) ./ (sigma*sqrt(2*pi))where m is the average and sigma is the standard deviation.
but you didn't use this formula? can you explain me why?
thank you

Contact us