Code covered by the BSD License
-
BERtheoretical(v_EbN0_dB,n_mo...
-
ReedSolomon(random,codeRS,Tx)...
-
TestBW (G,SUI,n_mod_type,samp...
-
TestCP(n_mod_type,SUI,samples...
-
TestChannels(n_mod_type,G,sam...
-
TestEncode(n_mod_type,G,SUI,s...
-
TestMods (G,SUI,samples,BW,fi...
-
[tap_variances,L,Dop]=CIRpowe...
-
bit_symbol(M,type,M1,M2)
-
channelSUI(N_SUI,G,BW)
-
createsymbol (pilots,data)
-
cyclic(symbol_ofdm,G,Tx);
-
decoder (pilots_tx,data_tx,sy...
-
draw(graphic,value,v_EbN0_dB,...
-
encoder (data_in,codeRS,templ...
-
estimatechannel(pilot_tx,data...
-
extract_data(symbol_ofdm_rx,v...
-
fadingcoeff=genh(I,v,Dop,tb)
-
find_index(num,table)
-
generatedata(n_mod_type,rate,...
-
generatepilot (n_symbol,Tx)
-
gray2bi( g )
-
graytable(K)
-
interleaving(data_convolution...
-
mapping( data_interleaving, n...
-
noise(symbolRx,SNR,n_mod_type...
-
parameters_SUI(N_SUI);
-
parameters_constellation(n_mo...
-
pb_pam_koh_ray (EbN0db,M,L,ma...
-
pb_psk_koh_ray (EbN0db,M,L,ma...
-
pb_qam_koh_ray (EbN0db,M,L,ma...
-
random(msg,BSID,DIUC,Frame);
-
receiver (symbolTx,G);
-
substrleft(k,pam)
-
systems (SNR,n_mod_type,G,N_S...
-
transmitter (pilot_mapping,da...
-
viterbi(msg,template,Tx);
-
bin_coef.m
-
wimax.m
-
View all files
|
|
| interleaving(data_convolutional,Ncpc,Tx);
|
function [data_interleave] = interleaving(data_convolutional,Ncpc,Tx);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% Name: interleaving.m %
%% %
%% Description: This process is for interleave the bits to transmit %
%% and to make sure two consecutive bits are not modulated to %
%% the same frequency. It is another form to fight against %
%% frequency selective fading and burst errors. %
%% %
%% %
%% Parameters: %
%% Sequence of bits to interleave. %
%% %
%% Result: It gives back the chain of bits, properly interleaved. %
%% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The size of the block to use to interleave the sequence is needed.
% This value is taken from table 223 of the standard.
% The value of the used block depends on the mapping that we want.
switch Ncpc
case 1 % for BPSK
Ncbps=192;
case 2 % for QPSK
Ncbps=384;
case 4 % for 16-QAM
Ncbps=768;
case 6 % for 64-QAM
Ncbps=1152;
end
s=ceil(Ncpc/2);
if Tx==1
% In the following operations, it is necessary to consider the following values:
% k-->index of the bit encoded BEFORE the first permutation
% mk-->index of this bit BEFORE the second permutation and AFTER the first one
% jk-->index after the SECOND permutation, just before the mapping of the sign.
k = 0:Ncbps-1;
mk = ((Ncbps/12)*mod(k,12))+floor(k/12); % First permutation
jk = s*floor(mk/s)+mod(mk+Ncbps-floor(12*mk/Ncbps),s); % Second permutation
% Now I must arrange the indices to know in what order I must take the bits of the entering sequence.
[a c] = sort(jk);
elseif Tx==0
% Again, it is necessary to understand the values:
% j-->index of the bit encoded BEFORE the first permutation
% mj-->index of this bit BEFORE the second permutation and AFTER the first one
% kj-->index after the SECOND permutation, just before the mapping of the sign.
j = 0:Ncbps-1;
mj = s*floor(j/s) + mod((j + floor(12*j/Ncbps)),s); % First permutation
kj = 12*mj-(Ncbps-1)*floor(12*mj/Ncbps); % Second permutation
% The indices are ordered to know what must be taken.
[a c]= sort(kj);
end
% finally the bits are rearranged.
i = 1:Ncbps-1;
data_interleave = zeros(1,Ncbps);
data_interleave(i) = data_convolutional(c(i));
|
|
Contact us at files@mathworks.com