1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Help Building Gaussian Random Script

Discussion in 'Scripting Workshop' started by UmFuFu, Mar 22, 2008.

Thread Status:
Not open for further replies.
  1. UmFuFu

    UmFuFu NI Product Owner

    Messages:
    100
    There's only a random number generator.
    Does anyone know if it's possible to "code" one in a script?

    THANKS
     
  2. kotori

    kotori NI Product Owner

    Messages:
    1,153
    Calculating something really accurate can be difficult due to the limitations of integer arithmetics. The simplest method is maybe to make use of the Central Limit Theorem and make an approximation by calculating the average of a small number of (I've seen people use 12) uniformly distributed random numbers.

    See: http://www.dspguide.com/CH2.PDF
    For help with a script implementation I recommend you bring the question over to the VI-Control forum. This seems like a good subject to discuss with Big Bob there who has already implemented functions like sin, cos and log in KSP.
     
    Last edited: Mar 22, 2008
  3. UmFuFu

    UmFuFu NI Product Owner

    Messages:
    100
    Hey Kotori,
    Wow, thanks so much for the help. I'll look at the DSP Guide chapter (which I didn't know about btw, so THANKS) and head over to VI.

    Ben
     
Thread Status:
Not open for further replies.