In [1]:
import numpy as np
import matplotlib.pyplot as plt
import IPython.display as ipd
In [2]:
t = np.linspace(0, 8, 300)
f1 = 5
f2 = 5.2
y = np.cos(2*np.pi*f1*t) + np.cos(2*np.pi*f2*t)
plt.plot(t, y)
Out[2]:
[<matplotlib.lines.Line2D at 0x7ff027953550>]