How to create a counter to add and minus?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kwan Zhao Jie
le 7 Mar 2018
Modifié(e) : Kwan Zhao Jie
le 7 Mar 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 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subplots 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!