test0802chirpif.m
来自「信号处理实例」· M 代码 · 共 42 行
M
42 行
%---------------------------------------------------------------------------------------
% test0802chirpIF.m, for example 08.02
% dabble chirp signal and its IF
% 2006.12.19 LYB
%----------------------------------------------------------------------------------------
clear;
N=128;
[x1,if1]=fmlin(N,0,0.3);
[x2,if2]=fmlin(N,0.2,0.5);
y=x1+x2;
t=1:N;
subplot(321)plot(t,real(x1));grid on;
ylabel('chirp 1')
subplot(323)
plot(t,real(x2));grid on;
ylabel('chirp 2')
subplot(325)
plot(t,real(y));grid on;
ylabel('x(t)=chirp 1+chirp 2')
subplot(322)
ifr=instfreq(x1);
plot(ifr'); grid;
axis([1 128 0 0.5]);
ylabel(' frequency');
subplot(324)
ifr=instfreq(x2);
plot(ifr'); grid;
axis([1 128 0 0.5]);
ylabel(' frequency');
subplot(326)
ifr=instfreq(y);
plot(ifr'); grid;
axis([1 128 0 0.5]);
ylabel(' frequency');
hold on;
subplot(326)
tfrideal([if1,if2]);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?