diff --git a/Matlab/comm/lab1_0.m b/Matlab/comm/lab1_0.m new file mode 100644 index 0000000..3582a57 --- /dev/null +++ b/Matlab/comm/lab1_0.m @@ -0,0 +1,15 @@ +Fs=1e4;N=1e4; %定义采样频率、FFT 长度 +t=(0:N-1)/Fs; %定义时间向量 +f=Fs*(-N/2:N/2-1)/N; %定义频谱自变量 f 向量 +ft=200*(sinc(200*(t-0.6))).^2; %产生三角频谱信号 +yt=ft.*cos(2000*pi*t); +F=fftshift(fft(yt,N))/N; %求频谱 +AF=abs(F); %求幅度谱 +AFdB=20*log10(AF); %求幅度谱/dB +subplot(311);plot(t,yt); +xlabel('t/s');grid on +axis([0.55,0.65,-10,210]) +subplot(312);plot(f,AF); +ylabel('幅度谱');xlabel('f/Hz');grid on +subplot(313);plot(f,AFdB); +ylabel('对数幅度谱/dB');xlabel('f/Hz');grid on \ No newline at end of file diff --git a/Matlab/comm/lab1_1.slx b/Matlab/comm/lab1_1.slx new file mode 100644 index 0000000..b3838db Binary files /dev/null and b/Matlab/comm/lab1_1.slx differ diff --git a/Matlab/comm/lab1_2.slx b/Matlab/comm/lab1_2.slx new file mode 100644 index 0000000..79d5627 Binary files /dev/null and b/Matlab/comm/lab1_2.slx differ