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

Home » Public Forums » archive » Re: 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
Re: filling an empty array [message #48613 is a reply to message #48605] Thu, 04 May 2006 00:27 Go to previous messageGo to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
But this is a perfect job for pointers - why avoid them?

index_data=ptrarr(32)
dat_x=randomu(0,1000,32)*4-2
dat_y=randomu(0,1000,32)*4-2

FOR i=0,31 DO BEGIN
index_data(i)=ptr_new(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

IDL> print,*index_data[1]
0 29 36 50 62
102 123 241 244 269 284
304 316 390 428 441 443
446 543
544 546 553 564 577
634 685 695 709 717 738
745 752 773 799 852 965

regards,
Greg
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: New IDLtoAVI with source code
Next Topic: Re: 6.3 reactions?

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

Current Time: Sat Oct 11 00:24:24 PDT 2025

Total time taken to generate the page: 0.32149 seconds