📄 test0804gaussmod.m
字号:
%---------------------------------------------------------------------------------------
% test0804gaussmod.m, for example 08.04
% gauss mod signal and its spectrum
% 2006.12.15 LYB
%----------------------------------------------------------------------------------------
clear;
N=64;
alpha=0.05;f0=0.25a=alpha/pi;a=sqrt(a);a=sqrt(a);
t1=((1:N)-N/2-1)';y = exp(-t1.^2 * alpha/2);
y=y.*a;
y1=exp(-i*2*pi*t1*f0);
y=y.*y1;
subplot(221)
plot((-N/2:N/2-1),real(y));grid on;
axis([-30 30 -0.5 0.5]);
xlabel(' Gauss modulated signal x(t)');
dsp=fftshift(abs(fft(y)).^2);
subplot(222)
plot((0:N/2-1)./N,dsp(1:N/2));grid on;
axis([0 0.5 0 20]);
xlabel(' the Spectrum of x(t)');
text(0.3,21,'test0804gaussmod');
[t0,T]=loctime(y)
t0=t0-N/2-1
[f0,B]=locfreq(y)
T*B
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -