How can I save and clear data entered into a MATLAB GUI?
For example, let's say I would like to design开发者_Go百科 a GUI with a table that the user enters data into. I then want to have 2 push buttons: one that will save the data currently in the table, and another that will clear the data from the table. Are there any code examples/tutorials that explain in general how I can accomplish saving/modifying the state of uicontrols in a GUI in this way?
Doug Hull from the MathWorks has a nice video tutorial showing how to save and restore the state of a GUI.
You should also check out 41 Complete GUI Examples (specifically GUI_41.m
) from Matt Fig on the MathWorks File Exchange.
It should be straight-forward to figure out from those examples how to also clear all the data from your GUI.
精彩评论