📄 cpfskmod_new.asv
字号:
function y = cpfskmod_new(x,M,h,nSamp,Fd)
%
%
M = 4;
h = 0.27;
Num = 4800;
Fd = 4800;
nSamp = 8;
rndInt = randsrc(Num,1,[1:M],12345);
x = 2*rndInt-(M+1);
x = x(:);
xIn = (x + (M+1))/2 - 1;
% Initialize the phase increments and the oscillator phase for modulator with
% discontinous phase. phaseIncr is the incremental phase over one symbol,
% across all M tones. phIncrSamp is the incremental phase over one sample,
% across all M tones.
samptime = 1/(Fd*nSamp);
phaseIncr = [0:nSamp-1]'*[-(M-1):2:(M-1)]*pi*(h*Fd)*samptime;
phIncrSym = phaseIncr(end,:);
phIncrSamp = phaseIncr(2,:); % recall that phaseIncr(1:0) = 0
prevPhase = 0;
[nRow,nChan] = size(xIn);
Phase = zeros(nSamp*nRow,1);
if nChan~=1
error('This program does not surpport multiple channel');
return
end
for i = 1:nRow
% Compute the phase of the current symbol by summing the initial phase
% with the per-symbol phase trajectory associated with the given M-ary
% data element.
Phase(nSamp*(-1)+1:nSamp*iSym,iChan) = ...
ph1*ones(nSamp,1) + phaseIncr(:,x(iSym,iChan)+1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -