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

Home » Public Forums » archive » Re: how to do a loop in idl using multi-commmand?
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: how to do a loop in idl using multi-commmand? [message #43536 is a reply to message #43535] Fri, 15 April 2005 10:19 Go to previous messageGo to previous message
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
I think you want some block statements here.
Save this to afile.pro and try ".run afile.pro"

***************
nH2=findgen(10001)*10.0+0.1
ratio=make_array(10001)
for i=0,10000 do begin
x=2*nH2[i]
y=x*nH2[i]
ratio[i]=x/y
endfor
openw,1,'file'
printf,1,ratio
close,1
end
***************

"lixiaoyao" <lixiaoyao5880@yahoo.com> writes:

> I can run this in my idl,who know how to solve it?
> <snip/>
> it seems to show you can not do multicommand in do loop.


hth
Matt
--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Nice ways to compile
Next Topic: .compile vs .run

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

Current Time: Sat Nov 29 15:08:28 PST 2025

Total time taken to generate the page: 1.76380 seconds