资源简介
无线网络中的信道译码算法,用LDPC编码的BP译码算法,程序相当精炼,迭代次数很少就能够译码
代码片段和文件信息
function [x_hat success k] = ldpc_decode(f0f1H)
% decoding of binary LDPC as in Elec. Letters by MacKay&Neal 13March1997
% For notations see the same reference.
% function [x_hat success k] = ldpc_decode(yf0f1H)
% outputs the estimate x_hat of the ENCODED sequence for
% the received vector y with channel likelihoods of ‘0‘ and ‘1‘s
% in f0 and f1 and parity check matrix H. Success==1 signals
% successful decoding. Maximum number of iterations(重复迭代) is set to 100.
% k returns number of iterations until convergence(收敛).
%
% Example:
% We assume G is systematic G=[A|I] and obviously mod(G*H‘2)=0
% sigma = 1; % AWGN noise deviation
% x = (sign(randn(1size(G1)))+1)/2; % random bits
% y = mod(x*G2); % coding
% z = 2*y-1; % BPSK modulation
% z=z + sigma*randn(1size(G2)); % AWGN transmission
%
% f1=1./(1+exp(-2*z/sigma^2)); % likelihoods
% by兰朋朋 ./矩阵元素右除 A./B表示A(ij)/B(ij)
% f0=1-f1;
% [z_hat success k] = ldpc_decode(zf0f1H);
% x_hat = z_hat(size(G2)+1-size(G1):size(G2));
% x_hat = x_hat‘;
% Copyright (c) 1999 by Igor Kozintsev igor@ifp.uiuc.edu
% $Revision: 1.1 $ $Date: 1999/07/11 $
% fixed high-SNR decoding
[mn] = size(H);
if m>n
H=H‘;
[mn] = size(H);
end
if ~issparse(H) % make H sparse if it is not sparse yet,%by兰朋朋 函数的功能是如果该函数不是稀疏矩阵,就把它转化为稀疏矩阵
%by兰朋朋 在MATLAB中,issparse函数用于判断一个稀疏矩阵存储方式是否是sparse storage organization
%by兰朋朋 如果稀疏矩阵的存储方式是sparse storage organization,则返回逻辑1;否则返回逻辑0。
[iijjsH] = find(H);
%by兰朋朋 返回矩阵H中的非零元素所在的行ii和所在的列jj和矩阵的非零元素sH
H = sparse(iijjsHmn);
%by兰朋朋 [ijs] = find(S);
%by兰朋朋 [mn] = size(S);
%by兰朋朋 S = sparse(ijsmn);
end
%by兰朋朋 BP译码算法
%initialization(没看懂)
[iijj] = find(H); % subscript index to nonzero eleme
- 上一篇:matlab分段灰度线性变换代码
- 下一篇:4dpsk调制解调的Matlab代码
相关资源
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
- 神经网络分类matlab程序
- matlab正弦信号发生器的设计
评论
共有 条评论