Skip to content

Instantly share code, notes, and snippets.

Created November 10, 2016 21:40
Show Gist options
  • Save anonymous/fce9c6b2c4c4630213f54b47e499b9ef to your computer and use it in GitHub Desktop.
Save anonymous/fce9c6b2c4c4630213f54b47e499b9ef to your computer and use it in GitHub Desktop.
ys = [a[0] * b[0]]
A = 0
B = 0
multiplier = exp(k)
for t in 1:T
A += a[t - 1]
B += b[t - 1]
y = ys[-1] * multiplier
y += A * b[t]
y += a[t] * B
y += a[t] * b[t]
ys.push(y)
return ys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment