MATLAB: How to insert an image to the static text in gui

image to static text

hi, I want to insert an image to the static text in GUI, I tried to modify it in the property inspector and I used the following: imread('myimagefile.jpg') but it didn't work , so can that be done? thanks

Best Answer

You must use an "axes" control, not a static text label control.
theImage = imread(filename);
axes(handles.axesImage); % Use actual variable names from your program!
imshow(theImage);