Description: x=zeros(1,N)
x(N/2-round(N/2*ta):N/2+round(N/2*ta))=ones(1,2*round(N/2*ta)+1)
y=fft(x,N)
figure
plot(t,x)
title([ 时域信号图 占空比为 ,num2str(ta)])
axis([-T T-0.2 1.2])
xlabel( t /s )
figure
subplot(211)
f=linspace(-fs/2,fs/2,N)
plot(f,abs(fftshift(y))/N)
title([ 矩形脉冲双边谱 脉冲时间t=[- ,num2str(ta*T), , ,num2str(ta*T), ] ])
xlabel( f /Hz )
To Search:
File list (Check if you may need any files):
example4_3.m