Perhaps you can find the "image" function from the Matlab Image Processing Toolkit related to what you want to do
As you can see, you can illustrate the matrix C by simply doing something like
image(C)
There is a second question about resizing an image.
imresize(C) B = imresize(A, [numrows numcols])
which shows him how he works ,
With regard to the display method of any matrix, the image may be indexed or true. An indexed image stores colors as an array of indices in a color palette. Instead, the color values for each pixel are stored directly as RGB triggers (R, G, B). Thus, any image can be called an array (m-by-n-by-3). This array consists of three m-on-n matrices (which are red, green, and blue color planes).
I believe the best way to find out how Matlab goes through its help and following the “Getting Started”
source share