rls_s.m

来自「比较LMS」· M 代码 · 共 31 行

M
31
字号
%RLS_S.m%RLS algorithm%static status%synchronous CDMA%channel: White Gaussis Noisefunction [P1,P_i_n,y,correct,E_ex] = RLS_S(b,N,K,step,yN_step,S,SNR)%multiuser detectionyyN_step=(yN_step);delta=1e-2;P=1/delta*eye(N);%P=1/Rlamda=0.997;for i=1:step    KK=P*yyN_step(:,i)/(lamda+yyN_step(:,i)'*P*yyN_step(:,i));    P=1/lamda*(P-KK*yyN_step(:,i)'*P);    h=P*S(1,:).';    c=h/(S(1,:)*h);        P1(i)=abs( (c.'*S(1,:).')^2 );    P_i_n(i)=abs( ( c.'*(yyN_step(:,i)-b(1,i)*S(1,:).') )^2 );    %SINR(i)=P1/P_i_n;    y(i)=sign(real(c.'*yyN_step(:,i)));        E=abs( (c.'*yyN_step(:,i))^2 );    E_min=1;    E_ex(i)=E-E_min;endcorrect=(y==b(1,:));%plot(SINR);

⌨️ 快捷键说明

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