so i need to make a gui with 2 push buttons, one that increments a counter displayed in a text box and one that clears the count. the only problem is that im not entirely sure how to work the clear button out... im using a persistent variable in the first push button function to increment the counter, but since its a persistent variable only that function can use it, so when i clear the counter with the 2nd push button, the text diplays 0, but next time it is incremented it will resume at whatever number it was on.
-this is for an assignment by the way, i need to email only the .fig and .m files, so i cant create a new m-file