Generates PAM or QAM data symbols spread in time and frequency depending on the modulation. function [ d ] = Generate_data( Para ) The function works for SISO and MIMO systems. Input arguments: Para: structure containing the modulation parameters. Outputs arguments: d: OQAM/PAM real symbols. Size: matrix [2*para.M, 2*Para.Ns] if Para.S == 1 and multidimensional array [Para.S, 2*para.M, 2*Para.Ns] if Para.S > 1
0001 function [ d_data ] = GenerateData( Para ) 0002 % Generates PAM or QAM data symbols spread in time and frequency depending 0003 % on the modulation. 0004 % 0005 % function [ d ] = Generate_data( Para ) 0006 % 0007 % The function works for SISO and MIMO systems. 0008 % 0009 % Input arguments: 0010 % 0011 % Para: structure containing the modulation parameters. 0012 % 0013 % Outputs arguments: 0014 % 0015 % d: OQAM/PAM real symbols. Size: matrix [2*para.M, 2*Para.Ns] if Para.S 0016 % == 1 and multidimensional array [Para.S, 2*para.M, 2*Para.Ns] if Para.S 0017 % > 1 0018 % 0019 0020 % This file is part of WaveComBox: www.wavecombox.com and is distributed under 0021 % the terms of the MIT license. See accompanying LICENSE file. 0022 % Original author: François Rottenberg, May 3, 2018. 0023 % Contributors: 0024 % Change log: 0025 0026 0027 switch Para.Modulation 0028 case 'FBMC-OQAM' 0029 d_data = Generate_d_PAM (Para); % Generate real PAM symbols 0030 case 'CP-OFDM' 0031 d_data = Generate_d_QAM (Para); % Generate QAM symbols 0032 case 'UFMC' 0033 d_data = Generate_d_QAM (Para); % Generate QAM symbols 0034 case 'F-OFDM' 0035 d_data = Generate_d_QAM (Para); % Generate QAM symbols 0036 case 'W-OFDM' 0037 d_data = Generate_d_QAM (Para); % Generate QAM symbols 0038 otherwise 0039 error('Para.Modulation parameter not defined') 0040 end 0041 0042 end