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

Home » Public Forums » archive » Re: Convolution, IDL & Numerical Recipes
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: Convolution, IDL & Numerical Recipes [message #32745 is a reply to message #32671] Mon, 04 November 2002 18:55 Go to previous messageGo to previous message
aceves is currently offline  aceves
Messages: 4
Registered: October 2002
Junior Member
"R.G. Stockwell" <sorry@noemail.now> wrote in message news:<3DC28954.7060605@noemail.now>...
>
> Perhaps you want to use the following keywords:
> Check out the help file to see the effects the keywords
> have on how the arrays line up to be convolved.
> (Note: you must explicitly set center=0, or else it defaults
> to 1)
>
> z=convol(a,k,center=0,edge_wrap=1)
>
> a 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0
> k 1 0 0 0 0 0 0 0 0
>
> z 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0
>
>
> Cheers,
> bob stockwell

Dear Bob...

It works well with the kernel [1,0,...]
But when I tried the actual examples of Numerical Recipes it did not
give me the same results:

a=[0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0]
k=[0,0,1,1,1,1,0,0,0]

z=convol(a,k,center=0,edge_wrap=1)
IDL> print,z
0 0 0 0 0 0 0 1 2
3 4 4 3 2 1 0
IDL>

With Numerical Recipes gives..

0 1 1 1 1 1 0 1 2 3 3 3 2 1 0 0

which seems ok!

Any other Idea? someone?

Thanks
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL --> C++ ?
Next Topic: About file length

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

Current Time: Fri Oct 10 01:29:05 PDT 2025

Total time taken to generate the page: 1.03906 seconds