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

7 ビュー (過去 30 日間)
Faheem Ur Rehman
Faheem Ur Rehman 2021 年 6 月 3 日
コメント済み: Walter Roberson 2021 年 6 月 3 日
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 件のコメント
Faheem Ur Rehman
Faheem Ur Rehman 2021 年 6 月 3 日
numFramesPerModType = 500;
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 Center および File ExchangeModulation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by