SHARE
TWEET

Untitled

a guest Dec 18th, 2015 20 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Series
  2. a = {1,2,3,4,5,6}
  3. top=5
  4.  
  5. What I need
  6. sum = 1*6 + 2*5 + 3*4
  7.  
  8. ---
  9.  
  10. Definition of discrete convolution
  11. (f*g)[n] = SUM[k=-inf..+inf] f(k)*g(k-n)
  12.  
  13. So,
  14.  
  15. (a*a)[top] = a(0)*(5) + a(1)*a(4) + a(2)*a(3) + a(3)*a(2) + a(4)*a(1) + a(5)*a(0)
  16. = 1*6 + 2*5 + 3*4 + 4*3 + 5*2 + 6*1
  17.  
  18. Dividing by :2 gives the desired result
  19.  
  20. (a*a)[top] / 2 = 1*6 + 2*5 + 3*4
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top