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

Home » Public Forums » archive » Re: I need a bit of help....Convol and functions
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: I need a bit of help....Convol and functions [message #50448 is a reply to message #50432] Mon, 02 October 2006 07:58 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
D.Kochman@gmail.com wrote:
...
> Sum[(-1)^n*cos(n*P(1)*X)*exp(-(2n)^2*P(2)*X), n ->0 to 10] convol
> exp[-X/P(4)]
>
> *whew*
>
> anyways, I've been working through the documentation on convol, and I
> find it a bit cryptic. I have very few clues how to implement this
> function in code. I'm guessing the first portion (the sum portion)
> needs to be recursively defined in a for loop. Is this the case, or is
> their a shortcut with a sigma type function built in?

Normally, TOTAL() would do the job of the Sigma sybol, but the fact
that you have to perform a function call to perform the convolution
gets in the way of that approach. Loops are indeed the way to go, in
this case.

> However, how do I easily convolve the two functions if they are
> functions and not arrays? Should I just go to fourier space?

CONVOL cannot convolve functions as functions, it can only calculate a
numerical approximation to the result of the convolution. That means
you have to represent the functions you are convolving, for CONVOL, as
arrays of function values at specific points. You'll want to use one of
the functions as the kernel for the convolution; I'd recommend using
which ever one drops off fastest with X. For your function, that
depends upon P(2), P(4), n, and the range of X values that you're
convolving over.

Fourier space won't allow you to get around this problem, unless you
can perform the calculations analytically in that space. Otherwise, all
you've done is change from using an array which represents the value of
the function at specific points, to using an array which represents the
value of the function's fourier transform at specific frequencies.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Low pass filter - Problem with kernel
Next Topic: I need a bit of help....Convol and functions

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

Current Time: Sun Nov 30 23:43:47 PST 2025

Total time taken to generate the page: 0.80187 seconds