Matlab Save Matrix As Image

All values in my array are integer from 1 to 10.
Matlab save matrix as image. Can somebody please help in saving the image. Then write the image data to a png file using the new colormap. Each time i try to save it i get a different error no matter which file format i try to save it as. Define a copper tone colormap with 81 rgb vectors.
When i use imwrite or save or saveas i create an image but when i read it into matlab values are from 0 255 no form 1 10. I need to save this matrix as an image image jpg. When i read the saved image i e myimage jpeg i must get the same values as in finalmat. The matrix is 768x768x2580 uint 8.
If you do not specify filename the save function saves to a file named matlab mat. The image array x and its associated colormap map are loaded into the matlab workspace. This seems to be something to do with the size of the matrix though i am not sure is there any advice about how to save this matrix as an image. Name of file specified as a character vector or string scalar.
Thank you in advance. Note that the x and y of the image are transposed in imagej in the second image see limitations of ijm show above. Map is a matrix of 81 rgb vectors. I want to save the image on disk without changing the values in the finalmat matrix.
However i want to have the same values integers from 1 to 10 in my image when i read the image into the matlab.