www.gusucode.com > 均衡算法误码率对比源码程序 > 均衡算法误码率对比源码程序/Code/VBlast.m

    function [x_vblast,X_vblast] = VBlast()
global Tx Y ModulationScheme H MM Amp
yy = Y;
ch = H;
%Initializing the received vector 
x_vblast=zeros(Tx(MM),1);
z=1:Tx(MM);
for i = 1 : Tx(MM)
    H_inv = pinv(ch) ;% Fiinding the Pinv
    % Sorting Strategy
    [val,index] = sort((sum(H_inv,2)).^2); % Finding the minimum sum squared row of Pinv of H 
    est_rxd = H_inv(index(i),:)*yy./Amp; % Detecting corresponding Symbol rxd
    % Slicing the Detected SYmbol to the nearest QAM Constelation Point
    tmp1 = ddemodce([1 est_rxd],1,1,'qask',ModulationScheme(MM)) ;
    x_vblast(index(i),1) = tmp1(2);
    tmp2 = Amp*dmodce([1 x_vblast(index(i),1)],1,1,'qask',ModulationScheme(MM)); 
    X_vblast(index(i),1) = tmp2(2);
    % Cancelling Detected and Sliced Symbol 
    yy=yy-(ch(:,index(i)))*(X_vblast(index(i),1));
    % Nulling the Correspoding Column of  H 
    ch(:,index(i)) = 0;
end