📄 mderep.m
字号:
function [Out,BlkSize] = mDerep(In,BlkSize,R,ModMode)
% Uplink Rx derepetition for OFDMA of IEEE 802.16 (WiMAX)
%
% [Out,BlkSize] = mDerep(In,BlkSize,R,ModMode)
%
% This module combines the repeated slots into one single slot.
% Note that repetition is only applied for QPSK.
%
% In : soft-decisions values (bytes, values -128 to 127)
% one column per code block
% BlkSize : row vector, length = number of code blocks
% number of data elements in each code block (or column)
% R : repetition factor (1,2,4 or 6)
% ModMode : Modulation Mode (2, 4 or 6)
%
% Matlab 7 Release 14 SP2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: mDerep.m.rca $
% $Revision: 1.3 $
% $Date: Thu Oct 19 17:52:15 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[m,n]=size(In);
if (ModMode~=2) & (R>1)
error('Error: Repetition is only allowed for QPSK.');
end
SlotSize=48*ModMode;
%check dimensions
[x,y]=size(BlkSize);
if ((x~=1)|(y~=n))
error('Error: BlkSize must be row vector with the same number of columns as In.');
end
if any(BlkSize>m)
error('Error: BlkSize can not be larger than number of rows.');
end
if any(mod(BlkSize,SlotSize*R))
error('Error: The block size does not match burst parameters.');
end
%repetition only required if repetition factor is greater than 1
if R==1
Out=In; %do nothing
else
temp=double(reshape(In,SlotSize,m/SlotSize,n));
Slots=temp(:,1:R:m/SlotSize,:);
for k=2:R,
Slots = Slots + temp(:,k:R:m/SlotSize,:);
end
Out = int8(reshape(Slots/R,m/R,n));
BlkSize=BlkSize/R;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -