1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Convolutions -IDL?

  1. Jun 6, 2006 #1
    I'm having a bit of trouble with this since the one page lecture note on this doesn't explain much and I can't really find any useful resources on the net.

    I understand that convolving a function can be like smoothing the function using a moving average, but then I don't see how you would make your kernel artificially long in IDL when you have a large array that you are wanting to convolve with the kernel.

    Let's say we have an array as follows:

    Array = fltarr(4000)

    I want to do a 48 month centred moving average. If you look through the time series array then let's say that you see the data covers 10 blocks of 48 months. Would you then have a kernel that has 10 central values of 1/10 with a whole heap of 0s either side???

    eg Kernel = [...0,0,1/10,1/10...,0,0...]

    If that is the case then how do I do this for an array of 4000 elements. I mean there must be a way were you can define what you want your central values of the kernal to be and then have IDL automatically make it a 4010 element array with 0s filling the rest of the array.

    IDL gives the notation of convolution as follows:

    Convol(array, kernel, scale factor)

    However, the help says that the kernel has to be smaller than the Array, but my lecture notes say that you have to make the kernel artificially long otherwise IDL doesn't allow you to run the kernel through the function properly.

    I'd greatly appreciate any help at all
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?