Visualize matrix by a heatmap
% PCOLORMAT allows you to visualize the matrix with color gradient
%
% USAGE:
%
% pcolorMat(mat,ncolor,ndigits)
%
% INPUT:
% - mat: The matrix you want to visualize
% - ncolor: number of color gradient
% - ndigits: number of decimal digits shown in the figure.
%
% OUTPUT:
%
% EXAMPLES:
% pcolorMat(rand(4,4))
% pcolorMat(rand(4,4),4)
%
% Copyright 2015. Zhang (Frank) Cheng (zhangc518@gmail.com
% v:1.0 22 May 2015. Initial release.
%
% Dependence:
% colorGradient.m: http://www.mathworks.com/matlabcentral/fileexchange/31524-colorgradient--generate-custom-linear-colormaps/content/colorGradient.m
Cite As
zhang (2024). Visualize matrix by a heatmap (https://www.mathworks.com/matlabcentral/fileexchange/50835-visualize-matrix-by-a-heatmap), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox > Descriptive Statistics and Visualization >
- MATLAB > Graphics > Formatting and Annotation > Colormaps > Green >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
pcolorMat/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |