📄 pr2_57.m
字号:
%Problem 2.57;
%signal time-resolution demo;
clear all; close all;
t=[0:1500]; N=length(t); %time scale;
tau=100; %time shift, take it within signal duration, which is about 500;
WD=[0 40]; %deviations of two LFM signals;
S=kron(ones(2,1),exp(-((t-250).^2)/1.5e4)).*exp(i*pi*WD'*((t-250)/500).^2); %complex envelopes of two bell-shaped LFM signals with different deviations;
car=exp(i*2*pi*t/10); %carrier
for k=1:2 %this loop do the same for both signals;
Sbp=real(S(k,:).*car); %bandpass pulse;
subplot(4,2,k); plot(t/500,Sbp); ylim([-1.2 1.2]); grid; ylabel('s(t)'); %plotting bandpass signal
SD=[zeros(1,tau), exp(i*2*pi*tau/10)*S(k,1:N-tau)]; %complex envelope of delayed copy;
SDbp=real(SD.*car); %bandpass delayed copy;
subplot(4,2,k+2); plot(t/500,SDbp); ylim([-1.2 1.2]); grid; ylabel('s(t-tau)'); %plotting shifted signal;
Y=S(k,:)+SD; Ybp=real(Y.*car);% zeros(1,500)]; %MF input complex envelope and bandpass signal;
subplot(4,2,k+4); plot(t/500,Ybp); ylim([-2.2 2.2]); grid; ylabel('MF input'); %plotting MF input signal;
R=xcorr(Y,S(k,:))/(norm(S(k,:))^2); R=R(1000:2500); R=real(R.*car); %matched filter output complex envelope and bandpass signal;
subplot(4,2,k+6); plot(t/500,R); ylim([-2 2]); grid; xlabel('t'); ylabel('MF output'); %plotting MF output;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -