To save changes in a notebook:
Switch to the notebook. (You cannot save changes in a MuPAD® notebook from the MATLAB® Command Window.)
Select File > Save or File > Save As from the main menu or use the toolbar.
If you want to save and close a notebook, you can use the close function in the MATLAB Command Window. If the notebook has been modified, then MuPAD brings up the dialog box asking if you want to save changes. Click Yes to save the modified notebook.