In [2]:
%pylab inline
import seaborn as sns
from ipywidgets import interact
In [3]:
w = linspace(0,20,100)
t = linspace(0,6,100)
w0 = 10
G = 1
F0 = 1
def plot_amplitud(w0, G, F0):
figure(figsize=(15,7.5))
A = F0/(w0**2 - w**2 - 1j*G*w)
subplot(121)
plot(w, real(A), w, imag(A))
ylim((-1,1))
subplot(122)
wam, nada = sqrt([G**2/4 - w0**2, 1j])
plot(t,exp(-G/2*t)*real(cosh(wam*t)))
interact(plot_amplitud, w0=(0,10,0.5), G=(0,5,0.01), F0=(0,10))
In [ ]: