user interface - Detect no.of Button clicks Matlab Gui -


is there way detect no.of times button clicked in matlab gui? new this, appreciated.

here's example. uses button's 'userdata' property hold counter. old syntax (pre-r2014b) used getting , setting properties:

h = uicontrol('style', 'pushbutton', 'string', 'push me'); %// create button set(h, 'userdata', 0); %// initiallize counter set(h, 'callback', 'set(gcbo,''userdata'',get(gcbo,''userdata'')+1)'); %// increase counter 

now click several times on button, , number of clicks with

get(h, 'userdata') 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -