clc; clear all; close all;
u=7;
Nzc=353;
% N=126
for i=1:u
for n=1:Nzc
x(n)=exp(-j*((pi*u*n*(n+1))/Nzc));
end
end
n=1:Nzc;
figure,plot(n,x);
title('Zad off sequence for u=7 and Nzc=353');
xlabel('Time');
ylabel('Amplitude');
x1=abs(x);
figure,plot(n,x1);
x2=xcorr(x);
figure,plot(1:(2*Nzc)-1,x2);
x3=fft(x);
figure,plot(n,x3);
u=1;
for n=1:Nzc
x(n)=exp(-j*((pi*u*n*(n+1))/Nzc));
end
u=2;
for n=1:Nzc
y(n)=exp(-j*((pi*u*n*(n+1))/Nzc));
end
x5=xcorr(x,y);
figure,plot(1:(2*Nzc)-1,x5);
%pss generation
pss_temp = zeros(31,2);
for n=1:31
pss_temp(n,1) = exp(-1i*pi*u*(n-1)*n/63);
pss_temp(n,2) = exp(-1i*pi*u*(n+31)*(n+32)/63);
end
pss = reshape(pss_temp,62,[]);
NID1=0; NID2=1;
qq = floor(NID1/30);
q = floor((NID1+qq*(qq+1)/2)/30);
mm = NID1+q*(q+1)/2;
m0 = mod(mm,31);
m1 = mod(m0+floor(mm/31)+1, 31);
PNgen = commsrc.pn('GenPoly', [1 0 0 1 0 1], ...
'InitialStates', [1 0 0 0 0], ...
'Shift', 0, ...
'NumBitsOut', 31);
PNtemp = generate(PNgen).';
PNseq = 1-2*PNtemp;
SCgen1 = commsrc.pn('GenPoly', [1 0 1 0 0 1], ...
'InitialStates', [1 0 0 0 0], ...
'Shift', 0, ...
'NumBitsOut', 31);
SCtemp = generate(SCgen1).';
SCseq1 = 1-2*SCtemp;
SCgen2 = commsrc.pn('GenPoly', [1 1 0 1 1 1], ...
'InitialStates', [1 0 0 0 0], ...
'Shift', 0, ...
'NumBitsOut', 31);
SCtemp = generate(SCgen2).';
SCseq2 = 1-2*SCtemp;
SSS = zeros(62,1);
for n=0:30
SSS(2*n+1) = PNseq(mod(n+m0,31)+1).*SCseq1(mod(n+NID2, 31)+1);
SSS(2*n+2) = PNseq(mod(n+m1,31)+1).*SCseq1(mod(n+NID2+3,31)+1).*SCseq2(mod(n+mod(m0,8),31)+1);
% case 6
% SSS(2*n+1) = PNseq(mod(n+m1,31)+1).*SCseq1(mod(n+NID2, 31)+1);
% SSS(2*n+2) = PNseq(mod(n+m0,31)+1).*SCseq1(mod(n+NID2+3,31)+1).*SCseq2(mod(n+mod(m1,8),31)+1);
end
% for n=1:Nzc
% x1(n)=x(n+Nzc)
% end
% n=1:Nzc;
% figure,plot(n,x1);
% title('Zad off sequence for u=7 and Nzc=353');
% xlabel('Time');
% ylabel('Amplitude');
weixin_42651887
- 粉丝: 102
- 资源: 1万+
最新资源
- cd35f259ee4bbfe81357c1aa7f4434e6.mp3
- 机器学习金融反欺诈项目数据
- 虚拟串口VSPXD软件(支持64Bit)
- 多边形框架物体检测18-YOLO(v5至v11)、COCO、CreateML、TFRecord、VOC数据集合集.rar
- Python个人财务管理系统(Personal Finance Management System)
- 大数据硬核技能进阶 Spark3实战智能物业运营系统完结26章
- CHM助手:制作CHM联机帮助的插件使用手册
- SecureCRT.9.5.1.3272.v2.CN.zip
- 人大金仓(KingBase)备份还原文档
- 完结17章SpringBoot3+Vue3 开发高并发秒杀抢购系统
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈