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

📄 ovsf_code.m

📁 用matlab程序实现WCDMA系统的仿真
💻 M
字号:
function y=ovsf_code(SF)
%***********************************************************************
%function y=ovsf_code(SF)
%
% Copyright 2002 The Mobile and Portable Radio Research Group
%
%Computes the channelization codes used for the WCDMA UTRA system.  The
%code generation algorithm is defined in ETSI TS 123 213 V3.2.1
%
% Parameters
%   Input
%    SF   scalar  Spreading factor (must be a power of 2)
%
%   Output
%    y    matrix  Matrix of channelization codes
%
%***********************************************************************

N=log2(SF);

%If SF is not a power of 2 then N will not be an integer
if rem(N,1)~=0,error(['SF = ',int2str(SF),': SF must be a power of 2'])
end

%If N is an integer, then we can continue
if SF==1, y=1; return; end

y=1;  %Initialize code for a spreading factor of 1
for k=1:N
   foo=[];
   for m=2:2:pow2(k)
      fee=y(m/2,:);
      foo=[foo;fee fee;fee -fee];
   end
   y=foo;
end

⌨️ 快捷键说明

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