comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: A question about Gaussian distributions in IDL

Re: A question about Gaussian distributions in IDL
type: item
description: In article <1120080420.668477.173460@z14g2000cwz.googlegroups.com>, "ntigris@gmail.com" <ntigris@gmail.com> wrote: > Hello, > > IDL's RANDOMN function creates a normal distribution with a mean of 0 > and a variance of 1. I need a variance other than one. Is there a > simple way to obtain such a distribution in IDL? > > Thanks a lot! Multiply the result of RANDOMN by the desired standard deviation. Cheers, Ken Bowman IDL> n = 100000 IDL> x = RANDOMN(seed, n) IDL> print, stdev(x) 1.00107 IDL> var = 9.0 IDL> std = sqrt(var) IDL> print, stdev(std*x) 3.00322 IDL> print, variance(std*x) % Compiled module: VARIANCE. % Compiled module: MOMENT. 9.01934
creator: Kenneth P. Bowman
date: 2005-06-30T02:14:46-00:00

Re: A question about Gaussian distributions in IDL
type: item
description: ntigris@gmail.com wrote: > IDL's RANDOMN function creates a normal distribution with a mean of 0 > and a variance of 1. I need a variance other than one. Is there a > simple way to obtain such a distribution in IDL? Here is an article: http://www.dfanning.com/math_tips/normsigma.html Cheers, David
creator: David Fanning
date: 2005-06-30T06:15:57-00:00

Re: A question about Gaussian distributions in IDL
type: item
description: Thanks!
date: 2005-07-01T00:53:33-00:00