how to call mfile function from gui?i have input image in one call back which i need to pass to the function in mfile....function call should be in another callback..
1 次查看(过去 30 天)
显示 更早的评论
function pushbutton2_Callback(hObject, eventdata, handles)
ention(handles.A,S,S1,S2,S3,S4,S5,S6) ;
function pushbutton1_Callback(hObject, eventdata, handles)
[file path]=uigetfile('*.jpg','Select any image');
chosenfile=[path file];
handles.A=imread(chosenfile);
global img
img=imread(chosenfile);
imshow(img);
%S values are values got from user using popmenu(7)
function popupmenu1_Callback(hObject, eventdata, handles)
global S
k= get(hObject,'String');
s=k{get(hObject,'Value')};
S=str2num(s);
i cant call my en function by passing those values along with img..i have also tried with handles.A or handles.S...
help me out..
error is
Reference to non-existent field 'A'.
Error in ==> d>pushbutton2_Callback at 140
ention(handles.A,S,S1,S2,S3,S4,S5,S6) ;
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> d at 42
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!