?? trellis_encoder.m
字號:
function enc_data = trellis_encoder(data,dlt,slt)
%**************************************************************************
% Space-time trellis channel encoder
% Q = TRELLIS_ENCODER(D,DLT,SLT) performs the data (D) encoding based on
% the DLT and SLT look-up tables. The tables for AT&T space-time codes
% these tables may be easily obtained from the LTABLE function. In fact
% the structure of look-up tables is as general as possible.
% The encoder doesn't care about the content of the look-up tables.
% This feature allows you to force the encoder's operation mode into
% the arbitrary scheme. Even an encoding based on block codes may be
% performed using the space function. This is when the slt table is
% filled with equal entries.
%**************************************************************************
[fr_length,l,frames] = size(data);
s = 1; % setting up initial state
for k = 1:frames
for i = 1:fr_length
d = data(i,1,k) + 1; % data_dim=1 % stc encoder
enc_data(i,:,k) = dlt(s,d,:) ; % stc encoder
s = slt(s,d,:) ; % stc encoder
end % stc encoder
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -