Re: Removal of zero values [message #51042] |
Fri, 03 November 2006 09:45 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> Coz, like, you meant "in case your array is *all* zeros", right?
Somehow my "This Don't Make No Damn Sense" filter
got shut off. One of those updates caused a problem.
It only works intermittently now. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Removal of zero values [message #51044 is a reply to message #51042] |
Fri, 03 November 2006 09:41  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning wrote:
> David Fanning writes:
>
>> P.S. Better done in two steps, in case your array
>> *doesn't* have any zeros, but I leave this as an
>> exercise for the user.
>
> Forget this. The phone rang as I was typing and I
> jumped and accidentally hit the SEND button. :-(
Coz, like, you meant "in case your array is *all* zeros", right?
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|
Re: Removal of zero values [message #51047 is a reply to message #51044] |
Fri, 03 November 2006 09:32  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> P.S. Better done in two steps, in case your array
> *doesn't* have any zeros, but I leave this as an
> exercise for the user.
Forget this. The phone rang as I was typing and I
jumped and accidentally hit the SEND button. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Removal of zero values [message #51048 is a reply to message #51047] |
Fri, 03 November 2006 09:30  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
StevenM writes:
> I have a LONG array from which I would like to remove the zero values.
> Is there any easy way to do this?
arrayNoZeros = array[Where(array NE 0)]
Cheers,
David
P.S. Better done in two steps, in case your array
*doesn't* have any zeros, but I leave this as an
exercise for the user.
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|