📄 scramble_long.m
字号:
function ScrambleCode = scramble_long(CodeNumber)
%************************************************************************************************
%function ScrambleCode = scramble_long(CodeNumber)
%
%Copyright 2002 The Mobile and Portable Radio Research Group
%
%this funciton produces a scramble sequence for the uplink of a WCDMA system, using the
%algorithm specified in ETSI TS 125 213 V3.2.0 (2000-03). The function generates this code
%by using the implementation that is pictorially described in figure 5 of the aforementioned
%specificatoin. This implemtation takes advantage of two shift registers, which this function
%emulates via circular buffers. The first circular buffer, X, is initiallized using CodeNumber.
%The second circular buffer Y is initiallized by setting all elements to 1.
%
%The function then performs the following operation using modulo 2 arithmetic
% x(n+25) = x(n+3) + x(n+1)
% y(n+25) = y(n+3) + y(n+2) + y(n+1) + y(n)
% z(n) = x(n+4) + x(n+7) + x(n+18)
% w(n) = y(n+4) + y(n+6) + y(n+17)
% Clong1 = x(n) + y(n)
% Clong2 = w(n) + z(n)
% Scramble_long(n) = Clong1 * (1 + j*((-1)^n)*Clong2(2*floor(n/2)))
%
%Parameters
% Input
% CodeNumber scalar unsigned value between 0 and 16777215 that determines the
% scramble code number
% Output
% ScrambelCode vector Vector of length 38400 containing the complex valued scrambling
% code
%************************************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -