After saving an image IM into appdata using
img=setappdata(0,IM,'pic')
I want to be able to check if this field 'pic' exists later. The reason is that I haver radio buttons that autoscale an image and I only want them to perform the autoscale routine if the image has been saved into memory using appdata.
Later when I retrieve the image by:
img=getappdata(0,'pic')
If the image isn't there,then I don't want the autoscale routine to continue (as it has nothing to autoscale and crashes)
I have tried:
isfield(0,'pic')but this didn't work.
Is there another way to check whether the IM has already been assigned the 'pic'
Thanks Jason
Best Answer