from matplotlib.pyplot import plot,axis,show
from numpy import linspace,cos,pi,ceil,floor,arange
f=40
tmin=-0.3
tmax=0.3
t=linspace(tmin,tmax,800)
x=cos(2*pi*f*t)
plot(t,x)
T=1/80
nmin=ceil(tmin/T)
nmax=floor(tmax/T)
n=arange(nmin,nmax)
x1=cos(2*pi*n*T*f)
plot(n*T,x1)
T=1/35
nmin=ceil(tmin/T)
nmax=floor(tmax/T)
n=arange(nmin,nmax)
x2=cos(2*pi*n*T*f)
plot(n*T,x2)
T=1/100
nmin=ceil(tmin/T)
nmax=floor(tmax/T)
n=arange(nmin,nmax)
x3=cos(2*pi*n*T*f)
plot(n*T,x3)
show()
from numpy import linspace,cos,pi,ceil,floor,arange
f=40
tmin=-0.3
tmax=0.3
t=linspace(tmin,tmax,800)
x=cos(2*pi*f*t)
plot(t,x)
T=1/80
nmin=ceil(tmin/T)
nmax=floor(tmax/T)
n=arange(nmin,nmax)
x1=cos(2*pi*n*T*f)
plot(n*T,x1)
T=1/35
nmin=ceil(tmin/T)
nmax=floor(tmax/T)
n=arange(nmin,nmax)
x2=cos(2*pi*n*T*f)
plot(n*T,x2)
T=1/100
nmin=ceil(tmin/T)
nmax=floor(tmax/T)
n=arange(nmin,nmax)
x3=cos(2*pi*n*T*f)
plot(n*T,x3)
show()
No comments:
Post a Comment