pr2_52.m

来自「Spread Spectrum and CDMA Principles and 」· M 代码 · 共 15 行

M
15
字号
%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 + =
减小字号Ctrl + -
显示快捷键?