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

Home » Public Forums » archive » Huh?? Stddev went crazy!
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
Huh?? Stddev went crazy! [message #59858] Wed, 16 April 2008 12:07
Conor is currently offline  Conor
Messages: 138
Registered: February 2007
Senior Member
I'd like to see someone explain this one. My stddev function
apparently lost all grasp on reality?

IDL> print,stddev([1,2,3,4,5])
3.07421 3.24566 3.08206 3.26360 2.97446
IDL> print,stddev([1.,2.,3.,4.,5.])
3.07421 3.24566 3.08206 3.26360 2.97446
IDL> print,stddev([1.,2.])
3.07421 3.24566

IDL> print,stddev(findgen(32))
2.99513 3.07421 3.24566 3.08206 3.26360
2.97446 2.96850 3.04474 2.66875 2.77181
2.83465
2.77395 2.77370 2.87829 2.84716 2.86982
2.98503 2.93160 2.77602 2.59318 2.83169
3.30869
2.67353 3.15337 3.19076 3.19499 2.96050
3.13871 2.61707 2.77854 3.12603 3.20029

Finally I did this:

IDL> .reset

And it returned to normal! Yeah!

IDL> print,stddev(findgen(32))
% Compiled module: STDDEV.
% Compiled module: MOMENT.
9.38083
IDL> res = findgen(10,10)
IDL> print,stddev(res)
29.0115

I have not been able to reproduce the crazy behavior since (not that
I've tried very hard). Still, it's rather worrisome if the behavior
of a built in function isn't reliable!!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: possible to find position vector immediately after plot?
Next Topic: Re: possible to find position vector immediately after plot?

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

Current Time: Fri Oct 10 19:12:45 PDT 2025

Total time taken to generate the page: 0.96222 seconds