Skip to content

Instantly share code, notes, and snippets.

@carlthome
Last active January 13, 2018 15:06
Show Gist options
  • Save carlthome/5e207fbfdaab461ec5e1c45c77dda944 to your computer and use it in GitHub Desktop.
Save carlthome/5e207fbfdaab461ec5e1c45c77dda944 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
Copy link
Author

The dual window would be:

dual_window = np.zeros(2 * N)
x = np.cos(np.linspace(-np.pi, np.pi, 2 * M))
transitions = (1 + x) / (1 + x**2)
dual_window[(N + M) // 2:(3 * N - M) // 2] = 1
dual_window[(N - M) // 2:(N + M) // 2] = transitions[:M]
dual_window[(3 * N - M) // 2:(3 * N + M) // 2] = transitions[M:]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment