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

📄 untitled2.asv

📁 此程序为DS-CDMA链路中加入基于子空间的PASTd多用户检测方法。系统中采用m序列阔频
💻 ASV
字号:
n = 6; % Try codeword length = 6.
% Find any valid message length for BCH code.
params = bchpoly(n);
n = params(1,1); % Redefine codeword length in case earlier one
% was invalid.
k = params(1,2); % Message length
m = log2(n+1); % Express n as 2^m-1.
msg = randint(100,1,[0,2^k-1]); % Column of decimal integers

% Create various codes.
% codehamming = encode(msg,n,k,'hamming/decimal');
% [parmat,genmat] = hammgen(m);
% codehamming2 = encode(msg,n,k,'linear/decimal',genmat);
% if codehamming==codehamming2
%    disp('The ''linear'' method can create Hamming code.')
% end
codebch = encode(msg,n,k,'bch/decimal');
% codecyclic = encode(msg,n,k,'cyclic/decimal');

% Decode to recover the original message.
% decodedhamming = decode(codehamming,n,k,'hamming/decimal');
decodedbch = decode(codebch,n,k,'bch/decimal');
ee = find(decodedbch )
% decodedcyclic = decode(codecyclic,n,k,'cyclic/decimal');
if (decodedhamming==msg & decodedbch==msg & decodedcyclic==msg)
   disp('All decoding worked flawlessly in this noiseless world.')
end

⌨️ 快捷键说明

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