The data for imagesc
is stored in the CData
property, so use this to extract it:
X = get(h, 'CData');
assuming h
is your handle.
Now X
contains your image data, and you can save it to a file, for instance:
save somefile.mat X
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…