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

Home » Public Forums » archive » for loops for total newbies
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: for loops for total newbies [message #54877 is a reply to message #54800] Mon, 16 July 2007 02:14 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Anna wrote:
> [skip]
>
> ===================================
> cor_row= fltarr(max_cor_shift)
> for i = 0, number_of_images-3 do begin
> print, i
> for j = 0, length-1 do begin
> for lag = -10, 10 do begin
> cor_row(lag+10)= c_correlate(data(i
> +1,*,j),data(i,*,j),-lag)
> endfor
> cor_array(i,j,*)=cor_row
> endfor
> endfor
> ===================================
>

here's another suggestion: c_correlate accepts an array
as lag, so instead of looping over lag from -10 to 10
you could just give it an array [-10,-9,..., 9,10] as
input, thus eliminating the innermost loop.

Ciao,
Paolo
[Message index]
 
Read Message
Read Message
Previous Topic: Re: rebin and !values.f_nan
Next Topic: fortran feasability

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

Current Time: Tue Dec 02 13:03:17 PST 2025

Total time taken to generate the page: 0.00249 seconds