필터 지우기
필터 지우기

Phase Noise on QPSK Signal

조회 수: 2 (최근 30일)
Lino
Lino 2019년 5월 31일
답변: Chandresh Vora 2019년 6월 17일
I am working with MATLAB R2016a. When I attempt to execute the below code I get the following error:
Array formation and parentheses-style indexing with objects of class
'comm.QPSKModulator' is not allowed. Use objects of class
'comm.QPSKModulator' only as scalars or use a cell array.
Error in qpskemv (line 23)
x = qpskModulator(d);
CODE:
qpskModulator = comm.QPSKModulator;
phNoise = comm.PhaseNoise('Level',-55,'FrequencyOffset',20,'SampleRate',1000);
d = randi([0 3],1000,1);
x = qpskModulator(d);
y = phNoise(x);
There is a note stating of course: "Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operation"
Can anyone tell me how to use this step to correct the above code?

채택된 답변

Chandresh Vora
Chandresh Vora 2019년 6월 17일
As the note suggests, y = obj(x) is equivalent to y = step(obj,x) starting R2016b. In R2016a, y = step(obj,x) is the correct syntax. Replace these two lines -
x = qpskModulator(d);
y = phNoise(x);
with -
x = step(qpskModulator,d);
y = step(phNoise,x);
Thanks,
Chandresh

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by