fh = figure('Name', 'Confusion matrix', ... 'NumberTitle', 'off'); plotmat(cMat1, 'k', 'k', 15); title(['Classification rate: ' num2str(classificationrate) '% for Naive Bayes Classifier'], 'FontSize', 14);
The heatmap function was introduced in 2017a. The imagesc function will work though. To display the numeric counts you will require a little more work with the text function requiring the location of the text and the x-y data points where the text should appear.
A = randi([0,20],5,5); imagesc(A); % Find the x, y locations for the text x = 1:size(A,2); y = 1:size(A,1); % Grid of X,Y locations: [X,Y] = meshgrid(x,y); % Convert numbers in matrix to cell array of chars c = cellfun(@num2str,num2cell(A),'UniformOutput',false); % Palce text labels at X,Y lcoations: text(X(:),Y(:),c(:),'HorizontalAlignment','center'); % Add a colorbar colorbar
This is basically what heatmap does by default, so upgrading makes things quite a bit easier.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.