Whhy it shows 'Undefined function or variable 'confMat'; Please check me code. I cant plot the confusion matrix
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
L = 3 ;
figure ('visible','on');
imagesc(confMat);colormap(flipud(gray)) ; caxis ([0,1])
textstr=num2str(confMat(:),'%0.2f');
textstr=strtrim(cellstr(textstr));
[x,y]=meshgrid(1:L);
hstrg=test(x(:),y(:) , textstr(:),
'HorizontalAlignment','center',
'FontSize',10,'FontName','Times New Roman');
midvalue=mean(get(gca,'Clim'));
textColors=repmat(confMat(:).midvalue,1,3);
set(gca,'XTick',1:L,
'XTickLabel',
{'Unripe','Ripe','Fruit'};
0 commentaires
Réponses (1)
Walter Roberson
le 4 Juin 2018
... because you have not created any confMat ?
Perhaps you missed the assignment in https://www.mathworks.com/matlabcentral/answers/313397-how-to-plot-confusion-matrix-of-ecoc-classifier
0 commentaires
Voir également
Catégories
En savoir plus sur Line Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!