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

Home » Public Forums » archive » Array definition
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Array definition [message #55277] Wed, 08 August 2007 10:00
Melanie is currently offline  Melanie
Messages: 4
Registered: August 2007
Junior Member
Hi,
I am trying to check an array of about 19000 elements for values that
are above a certain value. I then want to save only the index of the
larger values in a new array.

So, I am going through the original array with a for loop and checking
if each value is greater than 19:
for i=0, nelements-1 do begin
if (array1[i] gt 19) then...

Next, if the value in array1 is in fact greater than 19, I want to
save the value of i into a new array such as

if(array1[i] gt 19) then array2[...]=i

But I'm not sure how to make this work such that I can write each
subsequent i value for which the value in array1 is gt 19 into each
subsequenbt space in array2...

Any ideas? Please let me know if this question is not clear...
[Message index]
 
Read Message
Previous Topic: how to tell it is character or it is number?
Next Topic: Mac OS x IDL font handling

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

Current Time: Fri Oct 10 09:57:02 PDT 2025

Total time taken to generate the page: 1.11996 seconds