Re: Discrete convolution problem
- To: mathgroup at smc.vnet.net
- Subject: [mg43461] Re: Discrete convolution problem
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Wed, 17 Sep 2003 07:59:40 -0400 (EDT)
- Organization: AOL http://www.aol.com
- References: <bk6i7a$gno$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
discreteConvolution[tm_?VectorQ, f_, g_, T_] := Tr /@ Table[f[tm[[j]]+tm[[j+1]]]* g[tm[[i+1]]-T,tm[[j]],tm[[j+1]]], {i,1,Length[tm]-1},{j,i}]; discreteConvolution[{t0,t1,t2,t3}, f, g, T] {f[t0 + t1]*g[t1 - T, t0, t1], f[t0 + t1]*g[t2 - T, t0, t1] + f[t1 + t2]*g[t2 - T, t1, t2], f[t0 + t1]*g[t3 - T, t0, t1] + f[t1 + t2]*g[t3 - T, t1, t2] + f[t2 + t3]*g[t3 - T, t2, t3]} In article <bk6i7a$gno$1 at smc.vnet.net>, "J. Guillermo Sanchez" <guillerm at usal.es> wrote: << Given two functions f[t] and g[t] I wish to obtain their discrete convolution in points t: {t0, t1, t2, t3, ..} given with this pattern {f[t0+t1] g[t1-T,t0,t1], f[t0+t1] g[t2-T,t0,t1]+f[t1+t2] g[t2-T,t1,t2], f[t0+t1] g[t3-T,t0,t1]+f[t1+t2] g[t3-T,t1,t2]+ f[t2+t3] g[t3-T,t2,t3]} Some thing like this: discreteConvolution[list, f[t], g[t], t] = "(Function to be defined)" them Inp[]:=discreteConvolution[{t0, t1, t2, t3},f[t], g[t], t] Out[]:= {f[t0+t1] g[t1-T,t0,t1], f[t0+t1] g[t2-T,t0,t1]+f[t1+t2] g[t2-T,t1,t2], f[t0+t1] g[t3-T,t0,t1]+f[t1+t2] g[t3-T,t1,t2]+ f[t2+t3] g[t3-T,t2,t3]} >><BR><BR>