MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: iterative convolution, discret convolution N times of

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102448] Re: [mg102424] iterative convolution, discret convolution N times of
  • From: "Elton Kurt TeKolste" <tekolste at fastmail.us>
  • Date: Sun, 9 Aug 2009 18:20:21 -0400 (EDT)
  • References: <200908091004.GAA15801@smc.vnet.net>

Victoria

I suspect that you should double-check the documentation for
DiscreteConvolve: the argument of each function should be included in
its declaration as a parameter.  This means that the dummy variable in
the function (m) does not matter since it is called with the new dummy
(x).  Unfortunately, a bit of experimentation reveals that this does not
solve your problem...

convn=DiscreteConvolve[convn[x],fd[x],x,m,Assumptions->m>0];

I tried this with an example and it still did not work since
DiscreteConvolve returns what seems to be a function but is not;

Borrowing an example from the documentation

In[43]:= f = DiscreteConvolve[DiscreteDelta[n], Sin[n], n, m]

Out[43]= Sin[m]

It looks good, but is apparently not the answer since f is not a
function and thus is not suitable for use in your recursion.

In[44]:= f[\[Pi]]

Out[44]= Sin[m][\[Pi]]

One supposes that the problem is that Sin[m] is not the same thing as
Sin[m_].
What seems to work is to force f to be a function

In[45]:= f = 
 Function[m, DiscreteConvolve[DiscreteDelta[n], Sin[n], n, m]]

Out[45]= Function[m, DiscreteConvolve[DiscreteDelta[n], Sin[n], n, m]]

In[46]:= f[\[Pi]]

Out[46]= 0

We notice, however, that this strategy leaves the convolution
unevaluated, which might not work if you intend to do this recursively
(I can't tell without knowing fd).  However, the evaluation can be
forced.

In[47]:= f = 
 Function[m, 
  Evaluate[DiscreteConvolve[DiscreteDelta[n], Sin[n], n, m]]]

Out[47]= Function[m, Sin[m]]

In[48]:= f[\[Pi]/2]

Out[48]= 1

Perhaps those of our participants who are more familiar with the
underlying principles that govern Mathematica can explain why
DiscreteConvolve[...,m] is not a function of m.  

At any rate, I am guessing that the solution to your problem is to use

convn=Function[m,Evaluate[DiscreteConvolve[convn[x],fd[x],x,m,Assumptions->m>0]]];

in your loop.

Kurt

On Sun, 09 Aug 2009 06:04 -0400, "Anna" <petitmouton at gmail.com> wrote:
> HI, I'm trying to do N time convulution of a density funtion called
> "fd" with itself . I tried to write an algorithm as shown
> For[i = 1; convn = fd, i <= N, i++,
>  convn = DiscreteConvolve[convn, fd , x, m, Assumptions -> m > 0];
>  Print[convn]]
> 
> The initial function fd(x) has x as input variable. After the
> convolution, the results convn(m) is in the function of m instead of
> x. That's the reason why the algorithm I wrote doesn't work after the
> first iteration since the DiscreteConvolve function couldn't find the
> input in a function as x anymore.
> 
> I would like to ask a question is there a way to change the variable
> of a function? for exemple: how can I replace a function y = x+1 by y=m
> +1 ???? and is there another way to easily do a convolution N times of
> the same function? Thank you very much.
> Best regards,
> Victoria
> 
Regards,
Kurt Tekolste



  • Prev by Date: Re: Re: video on Presentations by Williams and
  • Next by Date: Re: Problem in plotting Bifurcation Diagram (ListPlot with
  • Previous by thread: iterative convolution, discret convolution N times of the same
  • Next by thread: Re: Re: iterative convolution, discret