Borrar filtros
Borrar filtros

how to use a variable returned from one callback function in an other callback funtion in GUI??

1 visualización (últimos 30 días)
I have two functions called sum1_Callback and disp_Callback
function c=sum1_Callback(hObject, eventdata, handles) c= 2*2;
function disp_Callback(hObject, eventdata, handles,c) disp(c)
In sum_Callback, I have a variable c which I want to use in disp_Callback, but I get an error telling the variable is undefined.
What should be done??
Thanks in advance for the help.

Respuestas (1)

Walter Roberson
Walter Roberson el 13 de Sept. de 2013
There are no callbacks that take eventdata as the second parameter and return values. The only callbacks that return values are the ones that are acting as filters, such as a constraint function programmed to ensure that a rectangle selection retains a particular proportion.

Categorías

Más información sobre Graphics Object Properties 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!

Translated by