MATLAB: Saving Image on Axes component to File

axesfileimagesave

Is there a reason why an image that is displayed on an axes1 is not saving to file via:
I=double(getimage(handles.axes1));
class I
figure
imshow(I,[])
imwrite(I,'C:\mtf.bmp')
the class of I is returning char?
Thanks

Best Answer

class I
is the short form of:
class('I')
so it is the character array containing an uppercase 'I'. Try:
class(I)
Now the problem, that the file is not written. Do you get an error message? Perhaps the one, that you do not have write permissions in C:\ ? Then try to save the file to another folder you have write permissions to.
Related Question