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

Home » Public Forums » archive » Re: newbie: subarray from array
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: newbie: subarray from array [message #31558] Mon, 15 July 2002 10:34
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
nando foppa wrote:
>
> Hello there,
>
> This is my first question in this discussion group - and a simple one:
>
> I have an array with different integer values
> e.g.[10,4,-9999,-9999,4,6,-9999,45,-9999]
> what I need is a new array without the (-9999) values. These values
> represent nodata in my dataset.
> -> [10,4,4,6,45] should be the result.
> I have already tried the function "arrdelete.pro" from Craig Markwardt
> which
> is a function to delete a section of an array. But in my case I have
> different subarray in my array and they are not alwalys at the same
> position.
> With WHERE I can define the position of the (-9999) values but how do
> I delete them automatically form many cases?
> I hope I expressed me correctly and that someone as an idea!

array = array[where(array NE -9999)]

You could put the where() directly inside the array[], but this approach
allows you to

--
James Kuyper
MODIS Level 1 Lead
Science Data Support Team
(301) 352-2150
[Message index]
 
Read Message
Previous Topic: newbie: subarray from array
Next Topic: newbie: multiple subarrays in array

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

Current Time: Fri Oct 10 09:46:49 PDT 2025

Total time taken to generate the page: 1.75917 seconds