cwjam.m

来自「此程序给出了不同情况的雷达距离测量仿真平台」· M 代码 · 共 50 行

M
50
字号
% Jamming of 31 Bit Shift Register Sequence
% with CW Noise
% -----------------------------------------

clear;clc;clf;

% Generate time vector

t=13/31*[1:1:61];

% Code order is 31-bit Maximal Length Sequence

x=[1 -1 1 1 -1 1 -1 1 -1 -1 1 1 1 1 -1 -1 -1 1 1 -1 ...
-1 1 -1 -1 -1 -1 -1 1 -1 1 1];

% CW-jamming in baseband with correct carrier

y=ones(1,31);

% Noise jamming in baseband with correct carrier

z=rand(1,31);

% Correlation of signal and jamming

acf1=xcorr(x);
acf2=xcorr(x,y);
acf3=xcorr(x,z);
effmv2=sum(acf2.*conj(acf2))/61;
effmv3=sum(acf3.*conj(acf3))/61;

% Plot jamming effects

subplot(211),plot(t,abs(acf1),':',t,abs(acf2));grid;
xlabel('Time in microsecs');
ylabel('Correlator Voltage Output');
title(['Pulse Compression Jamming With CW  Jam Effect=', ...
num2str(effmv2)]);
text(14,30,' No Jamming');
text(17,7,' Jammed Waveform');


subplot(212),plot(t,abs(acf1),':',t,abs(acf3));grid;
xlabel('Time in microsecs');
ylabel('Correlator Voltage Output');
title(['Pulse Compression Jamming with Noise  Jam Effect=', ...
num2str(effmv3)]);
text(14,30,'No Jamming');
text(17,7,'Jammed Waveform');

⌨️ 快捷键说明

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