This function visualizes a NxM matrix by plotting each matrix entry as a colored square (box). The entry value itself is also displayed. Since the digits of the number are not plotted as regular text but as bitmaps, the method scales the text for any matrix size.
A color matrix could be entered with size same as of the matrix to be visualized.
The intensity of the background color of each square (box) could also be defined by the user accordingly.
x = magic(5), viewmatrix(x);
x = magic(5), c = rand(size(x)), viewmatrix(x,c);
viewmatrix(magic(5), [ ], 0.3);
This file was written by Faisal Baig, with financial support by the Self-Study Online project of the University of Stuttgart.