anyone help to fix it? Array formation and parentheses-style indexing with objects of class 'comm.OFDMModulator' is not allowed. Use objects of class 'comm.OFDMModulator' only as scalars or use a cell array.

1 view (last 30 days)
I'm writing the following lines and getting above error
numSC = 128; % Number of OFDM subcarriers
cpLen = 32; % OFDM cyclic prefix length
ofdmMod = comm.OFDMModulator('FFTLength',numSC,'CyclicPrefixLength',cpLen);
ofdmDemod = comm.OFDMDemodulator('FFTLength',numSC,'CyclicPrefixLength',cpLen);
channel = comm.AWGNChannel('NoiseMethod','Variance', ...
'VarianceSource','Input port');
txSig1 = ofdmMod(st1); % where st1 is matrix of 117 by 1 complex double

Answers (1)

Steven Lord
Steven Lord on 15 Nov 2018
If you're using a release prior to release R2016b, I believe you will need to call step on the object to perform the operation on the data as stated in the Note at the top of the current release's documentation page for the comm.OFDMModulator object.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!