Hi everybody!

My thesis is about the material flow and I have tried to prepare a simulation tool in C#. I am too new in programing. For input of simulation, I need a random number generation tool. Before C#, I worked with MATLAB and in MATLAB the random number in any distribution is so easy. For example, if you need random number depend on normal distribution, you write only normrnd(mu,sigma).

However, in C# I can not find any random number generator (for all distribution). Do you have any idea about it?

Thanks for your help.

## 3 Replies - 7189 Views - Last Post: 07 August 2009 - 05:00 AM

##
**Replies To:** random number generation in any distribution

### #2

## Re: random number generation in any distribution

Posted 04 August 2009 - 05:40 AM

what do you mean by "for all distibution"? sorry, never worked with MATLAB so I don't really know what that means.

As for random numbers, .Net has the Random class.

http://msdn.microsof...tem.random.aspx

As for random numbers, .Net has the Random class.

http://msdn.microsof...tem.random.aspx

### #3

## Re: random number generation in any distribution

Posted 05 August 2009 - 07:33 AM

eclipsed4utoo, on 4 Aug, 2009 - 04:40 AM, said:

what do you mean by "for all distibution"? sorry, never worked with MATLAB so I don't really know what that means.

As for random numbers, .Net has the Random class.

http://msdn.microsof...tem.random.aspx

As for random numbers, .Net has the Random class.

http://msdn.microsof...tem.random.aspx

There are some distributions used in statistics, such as normal distribution, poisson distribution, and exponential distribution. This distributions are used also in simulation tools. Inputs from a source are sent depend on this distribution. I try to prepare a simulation tool for my thesis and I need random inputs but as I said the random number has to be depend on the distributions.

### #4

## Re: random number generation in any distribution

Posted 07 August 2009 - 05:00 AM

mgroses, on 5 Aug, 2009 - 06:33 AM, said:

eclipsed4utoo, on 4 Aug, 2009 - 04:40 AM, said:

what do you mean by "for all distibution"? sorry, never worked with MATLAB so I don't really know what that means.

As for random numbers, .Net has the Random class.

http://msdn.microsof...tem.random.aspx

As for random numbers, .Net has the Random class.

http://msdn.microsof...tem.random.aspx

There are some distributions used in statistics, such as normal distribution, poisson distribution, and exponential distribution. This distributions are used also in simulation tools. Inputs from a source are sent depend on this distribution. I try to prepare a simulation tool for my thesis and I need random inputs but as I said the random number has to be depend on the distributions.

Why can't you write your own class using them, based on their definitions?

Page 1 of 1