1

Is there any library in c# that contains the normrnd function in MATLAB and works the same way?

Help would be appreciated!

senna
  • 299
  • 1
  • 2
  • 12
  • This code project article could help you. http://www.codeproject.com/Articles/25172/Simple-Random-Number-Generation – cvraman May 22 '13 at 10:59
  • in case you need just a quick and dirty gaussian: Math.Pow(Math.E, -Math.Pow((Random.nextDouble()-mu)/sigma, 2))/ (sigma*Math.sqrt(2*Math.PI)); – Exceptyon May 22 '13 at 11:01
  • Possible duplicate of [Random Gaussian Variables](https://stackoverflow.com/questions/218060/random-gaussian-variables) – Mark Shevchenko Dec 04 '18 at 13:52

1 Answers1

0

I don't think there is a library do this exactly but I want to say something.

In .NET, there is a Random class which does;

Represents a pseudo-random number generator, a device that produces a sequence of numbers that meet certain statistical requirements for randomness.

For distribution part, there is an article which I think you must look.

Soner Gönül
  • 91,172
  • 101
  • 184
  • 324