pr3_29.m

来自「进行了基本的扩频中的 低检测、电器性检查、分集、瑞丽衰落等等的仿真 运行过」· M 代码 · 共 21 行

M
21
字号
%Problem 3.29;
%electromagnetic compatibility and spread spectrum;

clear all; close all;
t=[0.001:0.001:2]; N=length(t); %time scale;
Wd=100;
WD=[0,Wd,-Wd]; %three deviation values;
S=[exp(i*pi*WD'*(t(1:N/2)-0.5).^2),zeros(3,N/2)]; %complex envelopes of signals with three deviations;
SpY=(abs(fft(S')/norm(S))).^2
plot(SpY(:,2))
xlim([0 150]); ylim([-0.01,1]*0.7e3); xlabel('f'); ylabel('spectrum')
for k=1:3 %in the loop response is found of filter matched to k-th signal to each of three signals;
    H=S(k,1:N/2); 
    H=H(N/2:-1:1); 
    E=norm(H)^2; %matched filter pulse response (conjugated) for k-th signal;
    y=filter(H,1,S')/E; %filtering of all three signals by the filter matched to k-th signal;
    y=abs(y)'; %real envelopes of three signals at the k-th matched filter output;
    YL=[num2str(k),' MF env'];
    subplot(3,1,k); plot(t,y(1,:),'k',t,y(2,:),'b',t,y(3,:),'r'); xlabel('t/T'); ylabel(YL); ylim([-0.2,1.2]);
end;
%title('black, blue and red are for 1-st, second, and third signals')

⌨️ 快捷键说明

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