LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number generator from a distribution with an specified mean and variance?

Hi all,
 
I would like to create a generator of numbers following a distributions with an specified mean and variance. Any of you knows how to do this?
 
Please, help me, i m quite blocked with this problem..
 
Thank you very much in advance!
 
Javi.
0 Kudos
Message 1 of 26
(3,788 Views)
Javi,

What distribution are you trying to generate?  Gaussian?

-Jim
0 Kudos
Message 2 of 26
(3,775 Views)
Hi,

Not sure yet.. I m trying to emulete packets arrival to a netork node, so I guess I need Poisson and Gaussian.

Thanks.
0 Kudos
Message 3 of 26
(3,761 Views)
This is a problem commonly encountered when doing Monte Carlo simulations (and it sounds like this is what you are doing).

I found a discussion if this at http://omlc.ogi.edu/news/sep98/montecarlosampling/montecarlo1.html. You will also find it in other references dealing with Monte Carlo simulation.
0 Kudos
Message 4 of 26
(3,754 Views)
Check out vi.lib\gmath\statdist.llb\Continuous Random.vi for Gaussian and ...\Discrete Random.vi for Poisson.
These are polymorphic VIs.  Just pull down the selector to choose the distribution you wish to generate.

-Jim
0 Kudos
Message 5 of 26
(3,752 Views)

I have tried to look for this .vi, but i didn't find them in my computer. I guess it could be dued to the LabView version i am using is too old, v5.1, you think so? You think I could just paste the .vi in the folder of my computer? in that case, where could I find this file?

Thank you very much for your help... i'am a bit unexperienced in LabView.

Regards,

Javi.

0 Kudos
Message 6 of 26
(3,744 Views)
Hi gwd,
 
I have taken a look at the link you gave me. If I have understood it correctly, it means than the computer can generate a number of a desired distribusion from a random number, am I right? If so, what do I need to implement it in my computer?
 
Thank you very much!!
0 Kudos
Message 7 of 26
(3,739 Views)
Didn't know about these vis...but anyway...these are analysis vis, and you need a non-base version of Labview. I don't know if these even existed as far back as 5.

You can still do this the hard way if you are determined.
0 Kudos
Message 8 of 26
(3,740 Views)
gwd,
 
What do you mean "hard way"? sorry, i'm spanish-speaking, i still have some problems with english..
 
thanx!
0 Kudos
Message 9 of 26
(3,726 Views)
I just saw the previous message. Yes, you can do this the hard way. However the integral of a Gaussian is an error function and if you don't have the analysis vis you don't have that either. You would have to generate a text file of samples of the error function and use that as an approximation to the integral.

Time-consuming (although a good Labview exercise).

Another approach is to generate a large text file of random numbers with the right distribution (say, using Matlab or other computing software) and read them in sequentially with Labview.
0 Kudos
Message 10 of 26
(3,726 Views)