This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| fig = plt.figure(figsize=(5, 4)) | |
| # Generate some data | |
| mu, sigma = 1e7, 1e6 | |
| s = np.random.normal(mu, sigma, 10000) | |
| # Plot it | |
| plt.hist(s, 30, histtype='step') | |
| # Format it |