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

📄 boc.m

📁 几个BOC 信号的分析例程
💻 M
字号:
M=5;
N=1;
fs=80e6;
ind=9900:10100;
t=0:1/fs:10000/fs;
f0=1.023e6;
%code=cacode(1,N*1.023e6, fs,10000,0);
code = gcode(N*1.023e6, fs, 10000);
x=2*pi*f0*M*t(1:length(code));

Xnm1=code.*sign(exp(j*1*x));
Xnm1p=code.*sign(exp(-j*1*x));
Xnm3=code.*(exp(j*3*x));
Xnm3p=code.*(exp(-j*3*x));
Xnm5=code.*sign(exp(j*5*x));
Xnm5p=code.*sign(exp(-j*5*x));
Xnm7=code.*sign(exp(j*7*x));
Xnm7p=code.*sign(exp(-j*7*x));

CnmO=code.*sign(sin(x));
CnmQ=code.*sign(cos(x));


f = [0 0.02 0.02 1]; m = [1 1 0 0];
b = fir2(30,f,m);
%Cnm=filter(b,1,CnmO);
Cnm=CnmO;
figure(1)
subplot(2,1,1);
tmp=abs(fft(Xnm3));
plot(20*log10(fftshift(tmp)));

subplot(2,1,2);
tmp=abs(fft(Cnm));
plot(20*log10(fftshift(tmp)));


figure(2)
xc1=abs(xcorr(Cnm,Xnm1))+abs(xcorr(Cnm,Xnm1p));
xc3=abs(xcorr(Cnm,Xnm3))+abs(xcorr(Cnm,Xnm3p));
xc5=abs(xcorr(Cnm,Xnm5))+abs(xcorr(Cnm,Xnm5p));
xc7=abs(xcorr(Cnm,Xnm7))+abs(xcorr(Cnm,Xnm7p));

xias=(ind-10000)*1.023/80;
%plot(xias,xc2(9900:10100),xias,xc3(9900:10100),xias,xc1(9900:10100)+xc1n(9900:10100));
%figure(3)
%plot(xias,sqrt(xc2(9900:10100).^2+xc3(9900:10100).^2),xias,xc4(9900:10100));
subplot(2,2,1)
plot(xias,xc1(ind));
subplot(2,2,2)
plot(xias,xc3(ind));
subplot(2,2,3)
plot(xias,xc5(ind));
subplot(2,2,4)
plot(xias,xc7(ind));
    

⌨️ 快捷键说明

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