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

📄 get_ep.m

📁 一个UWB仿真程序包
💻 M
字号:
%% EP stands for error protection%% EP contains the ths, scrambling and interleaver_state%% function [ep,symbol_start] = get_ep(PACKET_LENGTH, ...%                                     SYMBOL_LENGTH, ...%                                     BURST_LENGTH, ...%                                     samples)%function [ep] = get_ep(PACKET_LENGTH, ...                       SYMBOL_LENGTH, ...                       BURST_LENGTH, ...                       samples)NHOP = SYMBOL_LENGTH/BURST_LENGTH/4;fprintf('Number of hops available = %d\n',NHOP);% $$$ % Get the polarity of the bursts% $$$ polarity = 2*round(rand(1,))-1;% $$$ % $$$ % Time-hopping sequence% $$$ ths = discr_unif(0,NHOP-1,PACKET_LENGTH);% Get the polarity and the time-hopping sequenceinit_reg = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0];[polarity,ep.ths] = ...    mex_scrambler(1,PACKET_LENGTH*BURST_LENGTH,BURST_LENGTH,log2(NHOP),init_reg);ep.scrambling = 2*polarity-1;% Get the interleaver state%ep.interleaver_seed = round(2^20*rand);ep.interleaver_seed = [];

⌨️ 快捷键说明

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