Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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