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

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 3 月 23 日

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by