title: How to use summation in MATLAB?
body: <p>I have a randomly generated vector, say <code>A</code> of length <code>M</code>.</p>
  
  <p>Say:</p>
  
  <pre><code>A = rand(M,1)
  </code></pre>
  
  <p>And I also have a function, <code>X(k) = sin(2*pi*k)</code>.</p>
  
  <p>How would I find <code>Y(k)</code> which is summation of <code>A(l)*X(k-l)</code> as <code>l</code> goes from 0 to <code>M</code>?</p>
  
  <p>Assume any value of k... But the answer should be summation of all <code>M+1</code> terms.</p>