How to convolve a function with delta function in Matlab?
<p>as we know that another function convolve with delta function,  the output will same as the function itself, for example</p>

<blockquote>
  <p>f(n) * δ(n) = f(n)</p>
</blockquote>

<p>For example</p>

<pre><code>n=-10:10;
h=[n&gt;=0];
i=[(n-4)&gt;=0];
f=h-i;
</code></pre>

<p>I get the function <code>f(n)</code>, but how should I code the <code>δ(n)</code> in order to  get a stem plot of <code>f(n) * δ(n)</code> ?</p>

<p>One more question, if we convolve one function itself repeatedly, what actually is happening? I try doing some chain convolution in Matlab like <code>conv(conv(f,f,'same'),f,'same');</code>, the stem plot are varying but i cant figure out the reason. 
Please assist, thank you.</p>