MATLAB: Saving notes to the startup function

MATLABsavetext;

I have an editable text area in my app and I would like to save the changes in it automatically to the startup function (this way next time that I will open the app I will see the notes from the last session). Can it be done?

Best Answer

Any specific reason why you want to do this in the start fcn? IMHO, the best way is to store the data in a separate file (example text, mat etc).
If you are, for some reason you need it, you will have to open the .m file using fopen and fwrite commands.
Related Question