According to your question, you want to know which variables would be the right arguments for “plotconfusion” function.
As mentioned in documentation:
“plotconfusion(targets,outputs) plots a confusion matrix for the true labels targets and predicted labels outputs.”
After observing your workspace variables, I have observed that you have “YTest” and “YPred” variables, which would signify “targets” and “outputs” arguments for “plotconfusion” function.
So you can implement your function as follows:
plotconfusion(YTest, YPred);
For more clarification, the following documentation links would be helpful:
You can also try “confusionmat” function :
You can try this command in your MATLAB command window for specific release documentation:
web(fullfile(docroot, 'images/ref/plotconfusion.html'))
For examples enter following command in your command window:
openExample('nnet/PlotConfusionMatrixUsingCategoricalLabelsExample')
Hope this helps you!

