'helperMod​ClassGetNN​Frames' is used in Modulation Classification with Deep Learning. Error in Project_1 (line 41) unknownFrames = helperModC​lassGetNNF​rames(rx);

6 次查看(过去 30 天)
Rician= (GI+1j*GQ);
signal= Rician.*tx';
snr=30;
A= (10^(-snr/20));
ric= Rician;
% noise
output=A*ric;
rx=signal+output;
unknownFrames = helperModClassGetNNFrames(rx);
% Classification
[prediction1,score1] = classify(trainedNet,unknownFrames);
plot(prediction1);
  1 个评论
Kunal Pathak
Kunal Pathak 2022-11-3
Getting an error
'helperModClassGetNNFrames' is used in Modulation Classification with Deep Learning.
Error in Project_1 (line 41)
unknownFrames = helperModClassGetNNFrames(rx);

请先登录,再进行评论。

回答(2 个)

Aditya
Aditya 2023-9-5
Hey Kunal,
The code snippet you provided seems to be missing the definition or initialization of several variables (`GI`, `GQ`, `tx`, `trainedNet`). To debug the code, you need to ensure that these variables are properly defined or initialized before executing the code. Here's a modified version of the code with placeholders for the missing variables:
GI = ...; % Define or initialize GI
GQ = ...; % Define or initialize GQ
tx = ...; % Define or initialize tx
trainedNet = ...; % Define or initialize trainedNet
Rician = (GI + 1j * GQ);
signal = Rician .* tx';
snr = 30;
A = 10^(-snr/20);
ric = Rician;
% Generate noise
output = A * ric;
rx = signal + output;
unknownFrames = helperModClassGetNNFrames(rx);
% Classification
[prediction1, score1] = classify(trainedNet, unknownFrames);
plot(prediction1);
Make sure to replace the `...` placeholders with the appropriate definitions or initializations for the missing variables (`GI`, `GQ`, `tx`, `trainedNet`). Additionally, ensure that the `helperModClassGetNNFrames` function is defined and accessible in your code.
By providing the missing variable definitions and ensuring the availability of the necessary functions, you should be able to debug and execute the code successfully.
hope this helps!

Steven Lord
Steven Lord 2023-9-5
This function is a helper function used and defined by the example. It is not a general toolbox function that is on the MATLAB search path by default. If you open the example in MATLAB or MATLAB Online, MATLAB will change the current directory to the example's folder which contains the helpers that example uses (including helperModClassGetNNFrames.m) and you would be able to use it to run the example.

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by