demodulate256.m
来自「幅度相位调制解调代码」· M 代码 · 共 23 行
M
23 行
function y = demodulate256(x,s256,c256);% function y = demodulate(x, b, e, s2,s4,s16,s64,s256, c2,c4,c16,c64,c256);%% Finds minimum distance estimate of each received signal and returns the% corresponding binary codeword. Use a Zero-Forcing approach for convenience%% y - modulated output, in the form of a row vector% x - a vector of input symbols, for all the subcarriers (row vector)% h - channel value (in frequency) for all subcarriers (64 elements)% b - subcarrier bit allocation (64 elements in this matrix, each one% corresponding to the number of bits to be allocated to the subcarrier% having the same index)% e - energy allocation (64 elements in this matrix)% s_ - the encoder for a given constellation size% c_ - the codewords as vectors of bits for the indicese=32;y=[];for i = 1:length(x) [tmp, index] = min(abs(s256-x(i)/sqrt(e))); y = [y c256(index,:)]; endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?