In [2]:
%pylab inline
Populating the interactive namespace from numpy and matplotlib
In [3]:
k = 0.875
f1 = lambda x: cos(2*np.pi*k*x)
f2 = lambda x: cos(2*np.pi*(1-k)*x)

figure(figsize=(10,8))
x = arange(1,20)
plot(x, f1(x), 'o')
grid()

figure(figsize=(10,8))
x = arange(1,20)
plot(x, f1(x), 'o')
x = linspace(1,20, 1000)
plot(x, f2(x))
grid()

figure(figsize=(10,8))
x = arange(1,20)
plot(x, f1(x), 'o')
x = linspace(1,20, 1000)
plot(x, f1(x))
grid()

figure(figsize=(10,8))
x = arange(1,20)
plot(x, f1(x), 'o')
x = linspace(1,20, 1000)
plot(x, f1(x))
plot(x, f2(x))
grid()
In [ ]: