信号与信号处理实验十二 信号的调制与解调【参考代码】
实验十二:1.参考程序clearclcfs=40;f=ones(1,81);t=-1:1/fs:1;f1=cos(2*pi*5*t).*f;figuresubplot(2,2,1), plot(t,f
实验十二: 1. 参考程序 clear clc fs=40; f=ones(1,81); t=-1:1/fs:1; f1=cos(2*pi*5*t).*f; figure subplot(2,2,1),plot(t,f),axis([-1.2,1.2,0,1.2]) title('f(t)') 时域波形 subplot(2,2,2),plot(t,f1),axis([-1.2,1.2,-1.2,1.2]) title('f1(t)') 时域波形 N=512; Xf=fftshift(abs(fft(f,N))); Xf1=fftshift(abs(fft(f1,N))); w=-N/2:(N/2-1); w=w*fs/N; subplot(2,2,3),plot(w,Xf) title('f(t)') 的幅度频谱 subplot(2,2,4),plot(w,Xf1) title('f1(t)') 的幅度频谱 2. 参考程序 clear clc Fs=400; Fc=40; N=400; n=0:N; t=n/Fs; 1

