www.pudn.com > mimoprecoding.rar > rx_soft_viterbi.m, change:2005-12-06,size:1075b


function data_bits = rx_soft_viterbi(rx_coded_bits,sim_options) 
%viterbi decode 
%depuncture  
% rx_coded_bits=rx_depunc_add_zero(rx_coded_bits, sim_options); 
 
%quantify 
% rx_coded_bits=rx_quantify(rx_coded_bits,sim_options); 
%longer the input  
tmp=zeros(1,size(rx_coded_bits,2)+sim_options.TracebackLength*2); 
tmp(1,1:size(rx_coded_bits,2))=rx_coded_bits; 
rx_coded_bits=tmp; 
%decode 
switch (sim_options.ViterbiType) 
    % decoded = vitdec(code,trellis,tblen,opmode,dectype)    
    case 'unquant' 
		rx_raw_bits = vitdec(rx_coded_bits, poly2trellis(7,sim_options.ConvCodeGenPoly), ...  
        sim_options.TracebackLength, 'cont', sim_options.ViterbiType); 
	case 'soft' 
        %decoded = vitdec(code,trellis,tblen,opmode,'soft',nsdec) 
        nsdec=sim_options.Nsdec; 
        data_bits = vitdec(rx_coded_bits, poly2trellis(7,sim_options.ConvCodeGenPoly), ...  
        sim_options.TracebackLength, 'cont', sim_options.ViterbiType, nsdec); 
	otherwise  
        error('invalid viterbi type.'); 
end 
data_bits(1:sim_options.TracebackLength)=[];    

2018无需申请注册送58体验金