passing variable from one callback to another callback in gui

1 vue (au cours des 30 derniers jours)
Akshay T P
Akshay T P le 12 Mai 2019
function first_Callback(hObject, eventdata, handles)
k=2;
function second_Callback(hObject, eventdata, handles)
g=k+1;
disp(g);
I want to use the k value in first function in second. How do I use it? Please help me...

Réponses (2)

Rik
Rik le 12 Mai 2019
Store the value of k inside your guidata struct.

Image Analyst
Image Analyst le 12 Mai 2019
This is a FAQ, so See the FAQ document

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by