MATLAB: How to create a 112×112 heatmap from a 112×1 table

112x112coloringheatmapMATLAB

Hi there, I have an 112×1 table from which I want to get a 112×112 heat map with each value versus each other value and based on the values to select specific colors. I am trying to use the function heat map but I can’t get a 112×112 heatmap. Maybe the function heatmap is not the right one? Any ideas would be really helpful.

Best Answer

Viewing a 112x112 matrix is easy. The hard part is creating the matrix. To do so, you need to define what "each value versus each other value" means. There has to be a single value.
As an example, you could you meshgrid to create 112x112 matrices for X and Y, and then somehow combine them to form a matrix Z. You could then use heatmap, imagesc, surf, or other 3D visualization technique to view the result.