PushButton HitCounter / simple question
Ältere Kommentare anzeigen
hey Guys,
I want to create a program, which includes a Code, that counts how many times u clicked on a button. My Thought was....use x = x +1 but where do I define x as 0 ?
here, it wont work
x = 0
function pushbutton8_Callback(hObject, eventdata, handles)
x = x +1
.......
here, it will always set x back to 0
function pushbutton8_Callback(hObject, eventdata, handles)
x = 0
x = x +1
PS: Sorry for that stupied Question
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Scope Variables and Generate Names finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!