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

Home » Public Forums » archive » Re: Removal of zero values
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: Removal of zero values [message #51048 is a reply to message #51047] Fri, 03 November 2006 09:30 Go to previous message
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Removal of zero values
Next Topic: IDL Segmentation Fault

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

Current Time: Sat Oct 11 09:28:44 PDT 2025

Total time taken to generate the page: 1.12160 seconds