mcds_cdma_comb_ideal.m
来自「一些关于调指和解调的小程序」· M 代码 · 共 26 行
M
26 行
function out=mcds_cdma_comb_ideal(input,ss_code,h,P)
%*******************************************************
%%% Orthogonality recover combining
%%% only combining, no demodulation
%%% the input is P*Lc matrix
%%% ss_code : spreading code, row vector
%%% h : channel transmission function(h=y./x),and is a
%%% P*Lc matrix in accordance with input
%*******************************************************
Lc=length(input); %%% input is a row vector, spreading factor = P
K=Lc./P;
sig=reshape(input,P,[]); %%% sig is a P*K matrix,each column is a spreaded symbol
hh=reshape(h,P,[]);
for i=1:K
G=1./hh(:,i); %%% ideal
G=G.'; %%% row vector, 1*P
comb(i)=(ss_code.*G)*sig(:,i)./P;
end
out=comb; %%% combined signal sequence, 1*L vector
%%% demodulation then can be performed
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?