bits2symbols.m

来自「APSK仿真程序」· M 代码 · 共 21 行

M
21
字号
%This function maps the input Bits to the Symbols
%Input Parameters:-
%Bits : Input Bits

%Output Parameters:-
%Symbols: Symbols for the input Bits

function Symbols = Bits2Symbols(Bits)
%Paramters Initialization
Parameter;
Initialconstellation;

Symbols = [];
SymbCount = round(length(Bits)/BitsPerSymb);
SymbolBits = reshape(Bits, BitsPerSymb, SymbCount)';

for iSymb = 1 : SymbCount
    SymbValue = bi2de([SymbolBits(iSymb, :)], 'left-msb');
    CurSymbol = Constellation_Table(SymbValue+1);
    Symbols = [Symbols, CurSymbol];
end

⌨️ 快捷键说明

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