num2colormap.m
I needed to create rgb jpg images of heatmaps that had the same dimensions as my input data. If a heatmap is created using the image function and then saved as a jpgeg, the dimensions of the resulting jpeg no longer correspond to the input dimensions of the data. This function returns a matrix of uint8 data with the same x and y dimensions as the data you input. The z dimension data correspond to RGB values. The output is suitable for conversion to jpg, tiff etc. using imwrite.m. This function supersedes num2jet.m. (Image processing toolbox required.)
Cite As
David Godlove (2024). num2colormap.m (https://www.mathworks.com/matlabcentral/fileexchange/28569-num2colormap-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Images > Convert Image Type >
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.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |