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

Home » Public Forums » archive » newbie MOMENT question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
newbie MOMENT question [message #6567] Fri, 12 July 1996 00:00 Go to next message
demott is currently offline  demott
Messages: 8
Registered: June 1996
Junior Member
Hi,

I want to compute the mean and variance of a set of data points, and
I'm using the MOMENT procedure to do it. With some fields, the
variance is quite small (i.e., o(e-03)), so I get floating point
underflow errors when MOMENT tries to compute the skewness and
kurtosis. since i don't really care about the skewness and kurtosis,
how can i get IDL to not worry about this, and continue with the
rest of the procedure? online help suggests that some combination
of ON_ERROR and/or CATCH would appropriate, but i haven't been
able to figure out exactly how to use these two yet. any suggestions?

thanks,
charlotte
Re: newbie MOMENT question [message #6647 is a reply to message #6567] Wed, 17 July 1996 00:00 Go to previous message
wmc is currently offline  wmc
Messages: 117
Registered: February 1995
Senior Member
> Charlotte DeMott wrote:
>> I want to compute the mean and variance of a set of data points, and
>> I'm using the MOMENT procedure to do it. With some fields, the
>> variance is quite small (i.e., o(e-03)), so I get floating point
>> underflow errors when MOMENT tries to compute the skewness and
>> kurtosis. since i don't really care about the skewness and kurtosis,
>> how can i get IDL to not worry about this, and continue with the
>> rest of the procedure? online help suggests that some combination
>> of ON_ERROR and/or CATCH would appropriate, but i haven't been
>> able to figure out exactly how to use these two yet. any suggestions?

Actually, there is a built-in routine "stdev" that computes the standard
deviation. Its in the "obsolete" directory. Presumably it was put there on
the grounds that it isn't ;-)

Re the floating underflows, I have found this to be a problem elsewhere.
It seems to be impossible to prevent the error messages. I've mentioned this
to some IDL support people and they basically said "ah well..."

---
William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3-d gaussian fitting
Next Topic: Announcement: CLIPS Expert System Training Seminar

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

Current Time: Fri Oct 10 23:02:01 PDT 2025

Total time taken to generate the page: 4.71876 seconds