datagen.m

来自「These files in Matlab implement a conven」· M 代码 · 共 20 行

M
20
字号
% Generation of the data signal which consists of the user information bits
% multiplied by the signature walsh sequence, specified by the index

function [user_data]=datagen(index,user_info);
global SG
Bitrate=19200;                  
Chiprate=1228800;

SG=Chiprate/Bitrate;       % Spreading Gain
index;                     % Index for the Walsh code word
[walshcode,W]=walsh(64,index);


user_info(find(user_info==0))=-1;  % Converting to Polar

user_data=repmat(user_info,SG,1);
user_data=user_data(:);

user_data=(user_data.*repmat(walshcode',length(user_info),1))';

⌨️ 快捷键说明

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