comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: mean and sdev
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: mean and sdev [message #11127 is a reply to message #11069] Tue, 10 March 1998 00:00 Go to previous messageGo to previous message
Alejandro C. Frery is currently offline  Alejandro C. Frery
Messages: 2
Registered: March 1998
Junior Member
Hi,

Though David's reply (the use of MOMENT) function is perfectly correct, that
function computes moments up to the fourth order, since it returns the mean,
the variance, the skewness and the kurtosis. If you only want the mean and
standard deviation, my suggestion is use the STDEV function (hidden and
undocumented, I do not know why) .

x = RANDOMU(seed, 1000)
std = STDEV(x, m) ; std will store the sample standard deviation and m the
sample mean (optional)
PRINT, std, m

Cheers,

Alejandro
Alejandro C. Frery UFPE-DI Recife, PE, Brazil
www.di.ufpe.br/~frery

R. Bauer escreveu na mensagem <34F95952.35B20DF0@fz-juelich.de>...
Hi,
I 'd like to know if a build in function somewhere is available to get
means and standard deviations.

I know
it's easy to do something like this:
mean = total(a)/n_elements(a)
but for 100000 values it takes a lot of my time.

Any ideas?


R. Bauer




--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Array intersections
Next Topic: Re: flanagan@spacenet

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 14:55:26 PST 2025

Total time taken to generate the page: 0.02374 seconds