Re: Convolution
- To: mathgroup@smc.vnet.net
- Subject: [mg10955] Re: Convolution
- From: Allan Hayes <hay@haystack.demon.co.uk>
- Date: Sat, 14 Feb 1998 00:53:26 -0500
- References: <6bumsu$l93@smc.vnet.net>
Larry Gottlob wrote: > I define two functions: > > Func1[x_] := tau*Exp(-x) > Func2[x_] := mu*x^2 > > for instance, where tau and mu are constants. > > How do I define a function of x that is a convolution of Func1 and > Func2, and plot that? Func1[x_] := tau*Exp[-x] Func2[x_] := mu*x^2 h[x_]= Integrate[Func1[s] Func2[x-s],{s,0,x}] (note use of = , not := , so that the integration is done at this stage and not for every sample point in the plotting below) In[142]:= Plot[h[x]/.{tau ->2, mu->3},{x,0,5}] -- Allan Hayes Training and Consulting Leicester, UK hay@haystack.demon.co.uk http://www.haystack.demon.co.uk voice: +44 (0)116 271 4198 fax: +44 (0)116 271 8642