Changing the size on input 1 is not allowed without first calling the release() method.

9 次查看(过去 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
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 CenterFile Exchange 中查找有关 PHY Components 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by