output argument not assigned during call error
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Fatma Nur Disci
am 13 Okt. 2020
Kommentiert: Fatma Nur Disci
am 28 Dez. 2020
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.
0 Kommentare
Akzeptierte Antwort
Matt J
am 13 Okt. 2020
Bearbeitet: Matt J
am 13 Okt. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ASK finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!