Clear Filters
Clear Filters

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

5 views (last 30 days)
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 Comment
Kunal Pathak
Kunal Pathak on 3 Nov 2022
Getting an error
'helperModClassGetNNFrames' is used in Modulation Classification with Deep Learning.
Error in Project_1 (line 41)
unknownFrames = helperModClassGetNNFrames(rx);

Sign in to comment.

Answers (2)

Aditya
Aditya on 5 Sep 2023
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 on 5 Sep 2023
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.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!