I would like to save in a matrix the plot that imagesc returns. How can I do that? All I know that imagesc returns a handle and I don\'t know what to do with it.
The data for imagesc is stored in the CData property, so use this to extract it:
imagesc
CData
X = get(h, 'CData');
assuming h is your handle.
h
Now X contains your image data, and you can save it to a file, for instance:
X
save somefile.mat X