A question on Matlab functions
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello everybody,
I had written a code for a input dialog box in matalb & the code is as follows.The following is my main function:-
hsurf_queue = uicontrol(...,
'Style','pushbutton',...
'Position',[10,350,110,30],...
'String','Open 3D raw file',...
'TooltipString','BusyAction = queue',...
'BusyAction','queue',...
'Callback',@surf_queue);
Now surf_queue is a function which is defined as:-
function [t]= surf_queue(hObject,eventdata)
t=1;
end
My question is that I want to return and print the value of t in main fucntion, how shall I do it ? My problem is if i add a line like:- t=surf_queue() , 2 times the function surf_queue is being called, i.e one in this line & the other one in uicontrol. Is there any one function whcich could be called to initilize a dialog window as well as print the return value of the function so that I could use the value of t in some other functions.
Thanks in advance for any help.
0 comentarios
Respuestas (1)
Walter Roberson
el 12 de Feb. de 2013
Note that callbacks of this style cannot return any values; they can only set values in places that other routines know to look for them.
0 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!