Skip to content

Instantly share code, notes, and snippets.

View drfeinberg's full-sized avatar

David R. Feinberg drfeinberg

View GitHub Profile
@BowenFu
BowenFu / envelope.py
Created January 5, 2017 02:43
matplotlib- amplitude envelope
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import hilbert, chirp
duration = 1.0
fs = 400.0
samples = int(fs*duration)
t = np.arange(samples) / fs
signal = chirp(t, 20.0, t[-1], 100.0)