I have two matrixes which the pixel value of one of them is 0, 1, ,2, 3. When I save them with the code below I get a copmletely black image while I can see the image as below when I use imagesc in matlab to see the image.
destdirectory = '/Users/good';
thisimage = 'first.png';
fulldestination = fullfile(destdirectory, thisimage);
for another image, the pixel values include NaN, 0, 3, 2.12334 and I saw the image that is saved is completely differnt with what I see when I use imagesc. The first image below is what I see by imagesc and the second one is what I see after I save it. I am intersted to save it exactly as I see in imagesc.
Thank you for your help.