feat(matlab): comm lab1

This commit is contained in:
iridiumR 2022-10-30 14:12:40 +08:00
parent e426c92968
commit 500c21b984
3 changed files with 15 additions and 0 deletions

15
Matlab/comm/lab1_0.m Normal file
View file

@ -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

BIN
Matlab/comm/lab1_1.slx Normal file

Binary file not shown.

BIN
Matlab/comm/lab1_2.slx Normal file

Binary file not shown.