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

Home » Public Forums » archive » filling an empty 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
filling an empty array [message #48616] Wed, 03 May 2006 20:51
JJMeyers2 is currently offline  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
[Message index]
 
Read Message
Previous Topic: Re: Surface plots in spherical coordinates
Next Topic: Re: Problem with for-slope

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

Current Time: Thu Oct 09 11:02:58 PDT 2025

Total time taken to generate the page: 0.72274 seconds