?? cp0203_qpsk_mod.m
字號:
%
% FUNCTION 2.10 : "cp0203_qpsk_mod"
%
% This function receives a binary stream in input ('bits')
% and returns the corresponding sequence of QPSK symbols
% ('S'),
% plus the two sequences 'Sc' and 'Ss' containing the real
% and imaginary part of each symbol
%
% Programmed by Guerino Giancola
%
function [S,Sc,Ss] = cp0203_qpsk_mod(bits)
nb = length(bits); % number of bits
ns = ceil(nb/2); % number of symbols
b0 = zeros(1,ns*2); % zero padding
b0(1:nb) = bits;
j = sqrt(-1);
for s = 1 : ns
ba = b0(((s-1)*2)+1);
bb = b0(((s-1)*2)+2);
k = bb + ba*2;
p = ((pi/4)*(2*k-1))-pi;
Sc(s) = cos(p);
Ss(s) = sin(p);
S(s) = Sc(s) + j*Ss(s);
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -