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

Home » Public Forums » archive » Re: Resizing arrays
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: Resizing arrays [message #45574 is a reply to message #45556] Tue, 20 September 2005 13:29 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> I have a simple question... I have an array, and inside it I have some
> zero values. I want to resize the array, cutting off the zero values. I
> want to keep only positive values in the new array.

IDL> a = [0, 1, 2, 0, 1, 2]
IDL> b = a[where(a gt 0)]
IDL> print, b
1 2 1 2


-Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Map Projections with User Defined Ellipsoids (Mars)
Next Topic: Re: Multicolored dashed lines???

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

Current Time: Tue Dec 02 11:18:33 PST 2025

Total time taken to generate the page: 0.15957 seconds