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

Home » Public Forums » archive » Approximate convolution - for loop problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Approximate convolution - for loop problem [message #64417] Sun, 21 December 2008 09:32 Go to previous message
samuel.leach is currently offline  samuel.leach
Messages: 1
Registered: December 2008
Junior Member
Hello everyone, I'm trying to execute a 1-d convolution of an array,
signal.

Using an analytic approximation, obtaining the convolved bolometer
signal, bolo_signal, at time step ii, is given by the following:

nsamp=n_elements(signal)
const1 = exp(-tsamp/taubolo)
const2 = 1.-const1


bolo_signal = const2*signal
for ii= 1L,nsamp-1L do begin
bolo_signal[ii] += const1*bolo_signal[ii-1]
endfor

where tsamp and taubolo are scalars. Is there any way to avoid the for
loop in this case? The hope is to speed up the execution.

Many thanks for your help

Sam Leach
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: scatter plots make large PostScript files
Next Topic: Running IDL remotely - problems with xwindows

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

Current Time: Fri Oct 10 08:14:28 PDT 2025

Total time taken to generate the page: 1.67941 seconds