output argument not assigned during call error

조회 수: 1 (최근 30일)
Fatma Nur Disci
Fatma Nur Disci 2020년 10월 13일
댓글: Fatma Nur Disci 2020년 12월 28일
Hi,
I need your help . I am working on Modulation Classification and I found a matlab tutorial about it using CNN classification algorithm.
First I want to generate random data and waveform for each modulation type. I run the trainFirst.m and waveform.m , respectively. I have also getModulator.m, getSource.m and helperModClassFrameGenerator.m
But the erorr is : Output argument "src" (and maybe others) not assigned during call to "getSource"
error in waveform(line17)
src = getSource (modulationTypes(modType),sps,2*spf)
I didn't get this error.

채택된 답변

Matt J
Matt J 2020년 10월 13일
편집: Matt J 2020년 10월 13일
In getSource.m, your switch block is missing an 'otherwise' clause,
switch modType
case {"BPSK","GFSK","CPFSK"}
M = 2;
src = @()randi([0 M-1],spf/sps,1);
case {"QPSK","PAM4"}
M = 4;
src = @()randi([0 M-1],spf/sps,1);
case "8PSK"
M = 8;
src = @()randi([0 M-1],spf/sps,1);
case "16QAM"
M = 16;
src = @()randi([0 M-1],spf/sps,1);
case "64QAM"
M = 64;
src = @()randi([0 M-1],spf/sps,1);
otherwise %<--- added
error("Unrecognized modType: "+modType);
end
  댓글 수: 3
Matt J
Matt J 2020년 10월 13일
You're welcome, but please Accept-click the answer to close the question.
Fatma Nur Disci
Fatma Nur Disci 2020년 12월 28일
Sorry for the late reply Matt. Actually I need your help again. I want to generate pulse modulation signals. So first I need to generate modulating signal then multiply carrier pulse train. If you interested in modulation types could you help me to generate some frames ? Bcs I really don't understand how to generate frames using that example I asked you before.
Thanks.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by