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

Home » Public Forums » archive » How to ignore NaNs in the data array with function cgPercentile.pro or Percentile.pro?
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: How to ignore NaNs in the data array with function cgPercentile.pro or Percentile.pro? [message #90947 is a reply to message #90946] Mon, 18 May 2015 06:28 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Madhavan Bomidi writes:

> I have two data arrays one with some missing data and the other
without missing data as below:
>
> data = [Randomu(3L, 100) * 100, !Values.F_NAN, !Values.F_NaN]
>
> data1 = [Randomu(3L, 100) * 100]
>
> When I use the cgPercentiles, I don't want missing data to be included.
>
> Print, cgPercentiles(data, Percentiles=[0.25, 0.5, 0.75])
> 21.8058 52.4532 77.3341
>
> Print, cgPercentiles(data1, Percentiles=[0.25, 0.5, 0.75])
> 21.8058 51.3569 76.6930
>
> Does this make sense to ignore missing data from the data array while obtaining the percentiles?

I don't see that you have a choice. You can't do math with cow pies (or
anything else that's not a number).

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spawn under Mac Os Yosemite
Next Topic: Distance between coordinates

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

Current Time: Wed Oct 08 16:14:19 PDT 2025

Total time taken to generate the page: 0.00189 seconds