how to read axes image and how to access that image

3 views (last 30 days)
Dear sir I load that image in axes but i can't get that image in subplots
My code :
function imagebtn_Callback(hObject, eventdata, handles)
[FileName,PathName]=uigetfile('*.*','Select any file');
img=fullfile(PathName,FileName);
axes1=imread(img);
axes(handles.axes1);
image(axes1);
guidata(hObject,handles);
function pushbtn1_Callback(hObject, eventdata, handles)
figure
ax(1) = subplot(1,2,1);
axes1= imread(img);
image(axes1); title('RGB image')
Error : ??? Undefined function or variable 'img'.
Error in ==> loimage>pushbtn1_Callback at 107
axes1= imread(img);
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> loimage at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)loimage('pushbtn1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!