⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pr2_53.m

📁 Spread Spectrum and CDMA Principles and Applications 书籍和代码
💻 M
字号:
%Problem 2.53;
%Simulating a complete signal waveform at the bandpass filter output;

clear all; close all;
F=[0,1,2]; %frequency mismatch in number of inverse pulse durations;
t=[0:0.01:2.5]; %time scale;
S=[ones(1,101) zeros(1,150)]; %input rectangular pulse real envelope;
Car=exp(2*i*pi*t*10); %complex carrier;
Si=S.*real(Car); %input bandpass signal;
subplot(221); plot(t,Si); axis([0 2.51 -1.2 1.2]); grid; xlabel('t/T'); ylabel ('input signal') %plotting input
SFi=kron(ones(3,1),S).*exp(i*2*pi*F'*t); %3x251 matrix, each row is frequency shifted input real envelope;
CEout=filter(ones(1,100),1,SFi'); CEout=CEout'; %output complex envelopes for all three frequency shifts;
Sout=real(CEout.*kron(ones(3,1),Car))*0.01; %complete output waveforms;
subplot(222); plot(t,Sout(1,:)); axis([0 2.51 -1.2 1.2]); grid; xlabel('t/T'); ylabel ('output signal, F=F1'); %plotting output for F1;
subplot(223); plot(t,Sout(2,:)); axis([0 2.51 -1.2 1.2]); grid; xlabel('t/T'); ylabel ('output signal, F=F2'); %plotting output for F2;
subplot(224); plot(t,Sout(3,:)); axis([0 2.51 -1.2 1.2]); grid; xlabel('t/T'); ylabel ('output signal, F=F3'); %plotting output for F3;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -