How to create a counter to add and minus?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kwan Zhao Jie
el 7 de Mzo. de 2018
Editada: Kwan Zhao Jie
el 7 de Mzo. de 2018
Im creating a simple counter which helps to add on one button and subtracts when pressing another button. I have done abit of research on this website previously and i found this code. but when i try and change the counter to minus. it doesnt work. Im using MATLAB R2013b GUIDE.
function nurse_Callback(hObject, eventdata, handles)
counter = get(hObject, 'UserData') + 1;
set(hObject, 'UserData', counter);
set(handles.Impt, 'String', sprintf('Number of Nurses currently: %d\n', counter));
0 comentarios
Respuesta aceptada
Image Analyst
el 7 de Mzo. de 2018
Maybe try calling guidata() at the end.
1 comentario
Kwan Zhao Jie
el 7 de Mzo. de 2018
Editada: Kwan Zhao Jie
el 7 de Mzo. de 2018
Más respuestas (0)
Ver también
Categorías
Más información sobre Subplots 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!