adaptation of two method of llr calculation

6 views (last 30 days)
Dear all, I have problem in the adaptation of llr calculation in the below function to the folowing clipping method {kappa = H_clip/P_clip;% the ratio kappa is given numerically %ll = P_clip*r.*(abs(r)<kappa)+H_clip*sign(r).*(abs(r)>=kappa);}
{function ll = calc_ll(r,sigma_n2,constellation,mapping) mod_idx = log2(length(constellation)); dist = zeros(2^mod_idx,length(r)); % for idx = 1:(2^mod_idx) dist(idx,:) = (real(r) - (real(constellation(idx)))).^2 + (imag(r) - (imag(constellation(idx)))).^2; end exp_mat = exp(-1./sigma_n2.*dist); ll = zeros(mod_idx,length(r)); for idx = 1:mod_idx ll(mod_idx-idx+1,:) = log(sum(exp_mat((bitget(mapping,idx)==0),:),1)) ... - log(sum(exp_mat((bitget(mapping,idx)==1),:),1)); end ll=ll(:);}
  2 Comments
Star Strider
Star Strider on 4 Feb 2017
First, that does not look like valid MATLAB code to me.
Second, I cannot figure out what you want to do by looking at it. Please tell us what you want to do (where you are starting, what you want as a result, and how you want to get there).
John D'Errico
John D'Errico on 4 Feb 2017
You say only that you have a problem. But what really is your problem?
The phrase "adaptation of llr calculation" has no meaning to anyone but you. Explain what you need if you want help.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!