Why I am getting error while using qammod function ?

조회 수: 6 (최근 30일)
majdi Khlfalla
majdi Khlfalla 2024년 10월 25일
편집: majdi Khlfalla 2024년 10월 26일
Hi
I am using matlab R2014a and I using the code below :
%% Simulation Parameters
numBits = 20000;
modOrder = 16;
%% Creat a source signal and apply 16-QAM modulation
srcBits = randi([0 1],numBits,1);
modOut = qammod(srcBits,modOrder,'InputType','Bit','UnitAveragePower',true);
%% Apply AWGN
SNR = 15;
chanOut = awgn(modOut,SNR);
scatterplot(chanOut)
%% Demodulate received signal
demodOut = qamdemod(chanOut,modOrder,'OutputType','Bit','UnitAveragePower',true);
I should have got the figuer above. But I am having the following error instead !
( Note : I run this code while typing my question and got the result above )
Error using qammod (line 28)
Too many input arguments.
and line 28 is found here :
27 - if(nargin>4)
28 - error(message('comm:qammod:numarg2'));
29 - end
thank you
  댓글 수: 2
Walter Roberson
Walter Roberson 2024년 10월 25일
You should double-check your help documentation.
I suspect that back in R2014a that there was no support for 'UnitAveragePower'
majdi Khlfalla
majdi Khlfalla 2024년 10월 26일
편집: majdi Khlfalla 2024년 10월 26일
@Walter Roberson yes, I did some research and found that problem was my matlab version. And instead of averaging power, I have to noramlize it in separate step. Thank you walter for your help

댓글을 달려면 로그인하십시오.

채택된 답변

Saurabh
Saurabh 2024년 10월 25일
I've encountered a similar issue in the past, and I was able to resolve it by upgrading my MATLAB version to R2016a or later.
I Hope this helps
  댓글 수: 1
majdi Khlfalla
majdi Khlfalla 2024년 10월 26일
@Saurabh Yeah, the problem was in my matlab version, I should upgrade now. many thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by