Separates preamble and data symbols. function [ d ] = MergePreambleData(d_preamble,d_data,Para) The function works for SISO and MIMO systems. Input arguments: d_preamble: symbols in the preamble d_data: data symbols Para: structure containing the modulation parameters. Outputs arguments: d: frame constaining preamble and data symbols
0001 function [ z_preamble,z_data ] = SeparatePreambleData(z,Para) 0002 % Separates preamble and data symbols. 0003 % 0004 % function [ d ] = MergePreambleData(d_preamble,d_data,Para) 0005 % 0006 % The function works for SISO and MIMO systems. 0007 % 0008 % Input arguments: 0009 % 0010 % d_preamble: symbols in the preamble 0011 % 0012 % d_data: data symbols 0013 % 0014 % Para: structure containing the modulation parameters. 0015 % 0016 % Outputs arguments: 0017 % 0018 % d: frame constaining preamble and data symbols 0019 % 0020 0021 % This file is part of WaveComBox: www.wavecombox.com and is distributed under 0022 % the terms of the MIT license. See accompanying LICENSE file. 0023 % Original author: François Rottenberg, May 3, 2018. 0024 % Contributors: 0025 % Change log: 0026 0027 switch Para.Modulation 0028 case 'FBMC-OQAM' 0029 if Para.N_R == 1 0030 z_preamble=z(:,1:Para.PreambleLength*2); 0031 z_data=z(:,Para.PreambleLength*2+1:end); 0032 else 0033 z_preamble=z(:,:,1:Para.PreambleLength*2); 0034 z_data=z(:,:,Para.PreambleLength*2+1:end); 0035 end 0036 case 'CP-OFDM' 0037 if Para.N_R == 1 0038 z_preamble=z(:,1:Para.PreambleLength); 0039 z_data=z(:,Para.PreambleLength+1:end); 0040 else 0041 z_preamble=z(:,:,1:Para.PreambleLength*2); 0042 z_data=z(:,:,Para.PreambleLength+1:end); 0043 end 0044 otherwise 0045 error('Para.Modulation parameter not defined') 0046 end 0047 0048 0049 end