argmaxmmse.m
上传用户:xinxin4122
上传日期:2013-04-03
资源大小:464k
文件大小:0k
源码类别:

邮电通讯系统

开发平台:

Matlab

  1. function [k, postSNR] = argmaxmmse(G,H,sigma2,krest)
  2. kno=length(krest);
  3. Gnorm=zeros(2,kno);
  4. % H
  5. % G
  6. GH2=abs(G*H).^2;
  7. G2=abs(G).^2;
  8. GH2norm=sum(GH2,2);
  9. G2norm=sum(G2,2);
  10. for ii=1:kno
  11.     jj=krest(ii);
  12.     if G2norm(jj)~=0
  13.         Gnorm(:,ii)=[jj;GH2(jj,jj)/(sigma2*G2norm(jj)+GH2norm(jj)-GH2(jj,jj))];
  14.     else
  15.         Gnorm(:,ii)=[jj;-inf];
  16.     end
  17. end
  18. % Gnorm
  19. [maxnorm, maxcol]=max(Gnorm(2,:));
  20. k=Gnorm(1,maxcol);
  21. postSNR=maxnorm;