I'm working with ofdm in Matlab R2015a but facing error kindly help to resolve this

1 回表示 (過去 30 日間)
Sajid Sarwar
Sajid Sarwar 2018 年 11 月 14 日
コメント済み: Walter Roberson 2018 年 11 月 15 日
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
but getting following error:
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 件)

Walter Roberson
Walter Roberson 2018 年 11 月 15 日
R2015a did not support that syntax . You will need to step() the object passing in the object as the first parameter and the data as the second parameter .
  2 件のコメント
Sajid Sarwar
Sajid Sarwar 2018 年 11 月 15 日
Please elborate it with some example
Walter Roberson
Walter Roberson 2018 年 11 月 15 日
Replace
txSig1 = ofdmMod(st1);
with
txSig1 = step(ofdmMod,st1);
Just like I described: use step() with the object passed as the first parameter, and the data as the second parameter.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOFDM についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by