Matlab GUI - Counter update through Pushbutton
Mostrar comentarios más antiguos
Hey MatLabers,
I am creating a GUI via the GUI editor in Matlab. However, trying to test how the pushbutton works, I was unable to make it increment a counter every time it is pressed and output the result on a static text.
Here is the part of the code in question, I thought it would be as simple as:
function Simulate_Callback(hObject, eventdata, handles)
Counter =0;
Counter = Counter +1;
set(handles.Counter ,'String',Counter);
the Counter object is just a static text.
Any idea guys?! Any help is greatly appreciated!
Thanks a lot!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!