⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdma_decode.asv

📁 This program is about coaxial sysytem of CDMA used in mobile communication
💻 ASV
字号:
function [Decoded,Decoder_Chip,Temp_Decoded,intgrl] =  ...
  CDMA_decode(OutSignal,Chipbit,User_to_Decode, ...
  SamplesPerBit,SamplePerChip,TotalDataBit)

% ........................ CDMA Decoding Starts Here .....................
clipto = TotalDataBit*SamplesPerBit;


TotalChips = length(Chipbit(:,User_to_Decode));
Decoder_Chip1 =[];
for l1 = 1:TotalDataBit
    Decoder_Chip1 = vertcat(Decoder_Chip1,Chipbit(:,User_to_Decode));
end
Decoder_Chip = MakeSampled(Decoder_Chip1,length(OutSignal),SamplePerChip);
Temp_Decoded = OutSignal.*Decoder_Chip;
Temp_Decoded = Temp_Decoded(1:TotalDataBit*SamplesPerBit);

intgrl = zeros(length(Temp_Decoded),1);
Avg_Ingl = 0;
Decoded = zeros(TotalDataBit,1);
    bitno = 0;
    for l1 = 1:TotalChips*SamplePerChip:length(Temp_Decoded)
        bitno = bitno+1;
        for l2 = l1:(l1+TotalChips*SamplePerChip-1)
            if (l2==1),intgrl(1)=Temp_Decoded(1);continue;end
            intgrl(l2) = intgrl(l2-1) + Temp_Decoded(l2);
        end
        if (intgrl(l2)>0),
            Decoded(bitno)=1;
        else
            Decoded(bitno)=-1;
        end
        intgrl(l2) = 0;
    end
intgrl=intgrl,zeros(length(OutSignal)-)
% ........................ CDMA Decoding Ends Here .....................

⌨️ 快捷键说明

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