no_orth_spreadcode.m

来自「多用户检测器的matlab仿真模型」· M 代码 · 共 8 行

M
8
字号
function [codeMatrix] = no_orth_spreadcode(SF)
% This function returns a matrix whose lignes are code vectors. These codes are 
% not orthonormal
C1=hadamard(SF);            % Generates a matrix with orthogonal vectors
C2=sign(randn(SF,1));       % Generates a cell code to ensure spreading
C3=diag(C2)*C1/sqrt(SF);    % Matrix normalized
C4=(rand(SF,SF)-.5)/3;      % Generates a noise matrix
codeMatrix = C4+C3;         % Sums the code and the noise to have non-orthogonal codes

⌨️ 快捷键说明

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