How to upload image using push button?
Mostra commenti meno recenti
Below is the code I'm using and it works for browse the folder.But the image didn't come out.
% --- Executes on button press in pushbutton1. function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [FileName,PathName]=uigetfile({'*.bmp,*.jpg'},'Select a image file'); axes(handles.axes1); imshow([Path_Name,File_Name]);
Here is the error when I run the code:
Undefined function or variable 'Path_Name'.
Error in iris1>pushbutton1_Callback (line 83) imshow([Path_Name,File_Name]);
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in iris1 (line 42) gui_mainfcn(gui_State, varargin{:});
Error in@(hObject,eventdata)iris1('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
Does anyone can suggest me a solution? Thank you.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!