filling an empty array [message #48616] |
Wed, 03 May 2006 20:51 |
JJMeyers2
Messages: 12 Registered: October 2005
|
Junior Member |
|
|
Hello,
I have an empty array that I am trying to fill out with results from a
conditional statement. Because I do not know the results of the
condition (and I do not want to use pointers) I make a really big array
and I fill it. When I compare the results though with the expected ones
they are not correct (except the first value). Any ideas on what the
problem might be?
Here is the part of the code:
index_data=intarr(32,1000)
FOR i=0,31 DO BEGIN
index_data(i)=
where((dat_x(*,i) GE -0.1) AND (dat_x(*,i) LE 0.1) AND $
(dat_y(*,i) GE -0.5) AND (dat_y(*,i) LE 0.5))
ENDFOR
The result of the 'where' statement is different for each of the i
cases and when I hard-coded several integers and compared with the
results of the loop they were different.
Does anyone have any idea what the problem is?
Thank you in advance,
JJM
|
|
|