📄 pr2_52.m
字号:
%Problem 2.52;
%Real envelope at the bandpass filter output, rectangular input bandpass pulse;
clear all; close all;
F=[0.5 0.75 1]; %frequency mismatch;
t=[0:0.01:4.5]; %time scale;
S(1,:)=[2*ones(1,100) zeros(1,351)]; %input signal real envelope;
S(2,:)=S(1,:).*exp(2*i*pi*F(1)*t);
S(3,:)=S(1,:).*exp(2*i*pi*F(2)*t);
S(4,:)=S(1,:).*exp(2*i*pi*F(3)*t); %frequency shifted input complex envelopes;
TR=1; %filter response duration;
H=[ones(1,100*TR) zeros(1,451-100*TR)]; %filter pulse response real envelope;
subplot(211), plot(t,S(1,:),t,H); ylim([0 2.2]); xlabel('t/T'); ylabel ('S(t), H(t)')% plotting real envelopes of the signal and filter pulse response;
Sout=abs(filter(H,1,S')); Sout=Sout'/200; %calculating real envelope at filter output, rectangular bandpass input pulse;
subplot(212); plot(t,Sout);xlim([0 4.5]); xlabel('t/T'); ylim([-0.2,1.2]); ylabel ('Sout(t)'); %curves of output envelope;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -