Cm2Im

Convert your confusion matrix to image with gray colored base boxes (based on percentage and text color of your choice.

You are now following this Submission

Unlike in-built function in matlab to plot Confusion matrix named "plotconfusion" here you can select number of pixels per value in confusion matrix.
for example,
if it is binary classification and CM is 2*2 then you can have 200*200 sized output image with 100*100 sized box for each value or of any other value you need. also you can change color of text written in image and font size.

Cite As

Parth Dethaliya (2026). Cm2Im (https://in.mathworks.com/matlabcentral/fileexchange/78005-cm2im), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with R2013a to R2020a

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.1

Summary Updated

1.0.0