Changing the size on input 1 is not allowed without first calling the release() method.
4 次查看(过去 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 中查找有关 PHY Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!