Changing the size on input 1 is not allowed without first calling the release() method.
조회 수: 7 (최근 30일)
이전 댓글 표시
I want to generate the 16ASK modulation using apskmod function by modifying the Autometic Modulation classifcation example of MATALB, but got an error. here x is the audio wave file.
sps = 8;
modulationTypes = categorical(["BPSK", "QPSK", "8PSK", "16PSK","32PSK"...
"16QAM", "32QAM","64QAM","128QAM", "256QAM","16APSK","PAM4", "GFSK", "CPFSK" ...
"B-FM", "DSB-AM", "SSB-AM"]);
rng(1235)
tic
numModulationTypes = length(modulationTypes);
for modType = 1:numModulationTypes
fprintf('%s - Generating %s frames\n', ...
datestr(toc/86400,'HH:MM:SS'), modulationTypes(modType))
label = modulationTypes(modType);
numSymbols = (numFramesPerModType / sps);
dataSrc = helperModClassGetSource(modulationTypes(modType), sps, 2*spf, fs);
modulator = helperModClassGetModulator(modulationTypes(modType), sps, fs);
if contains(char(modulationTypes(modType)), {'B-FM','DSB-AM','SSB-AM'})
% Analog modulation types use a center frequency of 100 MHz
channel.CenterFrequency = 100e6;
else
% Digital modulation types use a center frequency of 902 MHz
channel.CenterFrequency = 902e6;
end
The above one is main function and i have uploaded the 2 function whihc are being called by main function.
댓글 수: 3
Walter Roberson
2021년 6월 3일
spf is not defined. fs is not defined.
here x is the audio wave file.
? There is no reference to x in the code ?
When I put in spf = 128; fs = 22050; and run the code you posted, there is no error generated.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Modulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!