LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single Random Number from Gaussian with defined variance

Hi folks,

I'm new to LabView and was hoping someone could give me some pointers.

I need to generate a single random number from a Gaussian distribution of
defined variance.
This step is part of a for-loop (i.e., for each iteration, the variance changes).


Does anyone have suggestions as to how to do this most efficiently?
I realize there is a Gaussian White Noise function, and that I can specify
an array of length=1.
But the seed then needs to be changed for every step of the For-loop.
Is there an elegant solution to this that someone has already written?

Thanks in advanced for the help. Cheers,
erik
0 Kudos
Message 1 of 3
(4,554 Views)
Erik Hom wrote:
>
> Hi folks,
>
> I'm new to LabView and was hoping someone could give me some pointers.
>
> I need to generate a single random number from a Gaussian distribution of
> defined variance.
> This step is part of a for-loop (i.e., for each iteration, the variance changes).
>
> Does anyone have suggestions as to how to do this most efficiently?
> I realize there is a Gaussian White Noise function, and that I can specify
> an array of length=1.
> But the seed then needs to be changed for every step of the For-loop.
> Is there an elegant solution to this that someone has already written?
>
> Thanks in advanced for the help. Cheers,
> erik


Erik,
there's a random number generator in the numeric function palette.
The output is 0-1. You could s
ubtract 0.5 for zero mean, and multiply
the result for whatever variance you need.

Walter
0 Kudos
Message 2 of 3
(4,554 Views)
In article <38444E8D.58CC9209@brokersys.com>, Walter Petermann wrote:
>Erik Hom wrote:
>> I need to generate a single random number from a Gaussian distribution of
>> defined variance.
>
> Erik,
> there's a random number generator in the numeric function palette.
> The output is 0-1. You could subtract 0.5 for zero mean, and multiply
> the result for whatever variance you need.
> Walter
Walter,
that would end up in a linear distribution, not in a Gaussian distribution.

Eric,
'feed' the Gaussian distribution vi with that linear random number should solve
your problem.

Greetings from Germany
Henrik
--
---------------------------- Corinna & Henrik Volkers
volkers@freebsd.first.gmd.de
| | |
__|._.__|._.__|._.____
________________ beeeeeeeeeeeeee...
| | |
0 Kudos
Message 3 of 3
(4,554 Views)