Borrar filtros
Borrar filtros

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..

2 visualizaciones (últimos 30 días)
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

Respuestas (1)

Walter Roberson
Walter Roberson el 23 de Mzo. de 2014

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by