dl_star_back.m

来自「wcdma_simulation_simulink用matlab simulin」· M 代码 · 共 71 行

M
71
字号
function [N, N_frame, K, C,CRC,tail,nPilot,TPC,TFI,ratem_flag] = dl_start(nCode, c_type, Kindex,  nFrames)%% MIGHT WANNA ADD LATER tx_ch_type%% nCode = spreading factor% c_type = mode indicating the channel coding scheme%      1 = Convolutional coding with   %      3 = Turbo coding (NOT YET)% K_index = Coding ratio (input values: (1,2)% nFrames = number of frames in each block interleaver% %% N = User input block size% K = Coding ratio  (output values: 2 or 3)% nTail = tail length% nPilot  = number of Pilot bits per slot% TPC  = number of power bits per slot% TFI = number of TFI bits per slot% ratem_flag = 0 or 1 depending if ratematching is used or notR = 4096000;        % chips /snSlot = 16;         % Number of slots per frametFrame = 1/100;     % 10 msif (c_type == 1)if (Kindex >1) disp('Only coding ratio 3 is implemented currently'); end; K = 3 ;tail = 8;nPilot = 8;TPC = 3;TFI = 2;CRC = 16;nCode if length(nCode) < 2for(i=1:nCode)  C(i) = (-1)^i; end; else  C = nCode; nCode = length(C);end;total_bits = R/nCode * 2bits_slot = total_bits * tFrame / nSlotcoded_bits_frame = (bits_slot - nPilot -TPC - TFI) * nSlotN_tmp = ( nFrames * coded_bits_frame - CRC*K - tail) N = floor(N_tmp/K) N_frame =coded_bits_frame; ratem_flag=0return;end;if (c_type > 1)    disp('Only the convolutiona channel coding (1/3, 9) is implemented currently');        return;end;if (nargin > 2)end;

⌨️ 快捷键说明

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