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

Home » Public Forums » archive » Make_array() and using arrays as subscripts
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Make_array() and using arrays as subscripts [message #46859] Mon, 09 January 2006 12:19
Liberum is currently offline  Liberum
Messages: 48
Registered: September 2005
Member
Hi everyone,

I have a problem with the function MAKE_ARRAY() that I hope someone can
help me with.
I created a string array with the dimension (3, 344) and performed some
basic assignment operations.
Now I know that when I am finished with the operations I will perform
on the array, the length 344 will be too long. Let's say that only the
first 120 elements will be needed. Now I assigned that entire array the
string '9999' and then when I am ready to reduce the size of the array
I used the WHERE() function to find the indices where each element is
not equal to '9999'. All went well until I form this array-as-subscript
operation:

my_array = my_array[good_indices]

The dimensions all disappear and all I get is an array with the
elements equalling the number of elements of good_indices, i.e.,

print, size(my_array,/dimensions)

IDL> 120

Now I have used this type of array-as-subscript before on other types
of array and I have never had this problem before. Does anyone know why
this happens or how can I cut my_array without losing my 3 dimensions?

Sincerely,
Sheldon
[Message index]
 
Read Message
Previous Topic: quick matrix algebra question
Next Topic: Re: quick matrix algebra question

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

Current Time: Fri Oct 10 18:45:17 PDT 2025

Total time taken to generate the page: 1.27868 seconds