% Shuang Wang, Lijuan Cui and Samuel Cheng
% Copyright ? 2007-2011 Shuang Wang
% For any questions, please contact me by shuangwang AT ou dot edu
% L. Cui, S. Wang, S. Cheng, M. Yeary, "Adaptive Binary Slepian-Wolf Decoding using Particle Based Belief Propagation", Communications, IEEE Transactions on, to appear.
% S. Wang, L. Cui, S. Cheng, Y. Zhai, M. Yeary, Q. Wu, "Noise Adaptive LDPC Decoding Using Particle Filtering," Communications, IEEE Transactions on, Vol 59. pp. 913 - 916, April 2011.
function sigma = snr2sigma(SNR, codeRate)
SNR = 10.^(SNR./10);
sigma = (2*codeRate*SNR).^(-0.5);