'helperModClassGetNNFrames' is used in Modulation Classification with Deep Learning. Error in Project_1 (line 41) unknownFrames = helperModClassGetNNFrames(rx);
显示 更早的评论
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);
回答(2 个)
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
2023-9-5
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!