The two main types of files in MuPAD® are:
Notebook files, or notebooks
A notebook file has the extension .mn and lets you store the result of the work performed in the MuPAD Notebook app. A notebook file can contain text, graphics, and any MuPAD commands and their outputs. A notebook file can also contain procedures and functions.
By default, a notebook file opens in the MuPAD Notebook app. Creating a new notebook or opening an existing one does not automatically start the MuPAD engine. This means that although you can see the results of computations as they were saved, MuPAD does not remember evaluating them. (The "MuPAD Workspace" is empty.) You can evaluate any or all commands after opening a notebook.
A program file is a text file that contains any code snippet that you want to store separately from other computations. Saving a code snippet as a program file can be very helpful when you want to use the code in several notebooks. Typically, a program file contains a single procedure, but it also can contain one or more procedures or functions, assignments, statements, tests, or any other valid MuPAD code.
The most common approach is to write a procedure and save it as a program file with the extension .mu. This extension allows the MATLAB® Editor to recognize and open the file later. Nevertheless, a program file is just a text file. You can save a program file with any extension that you use for regular text files.
To evaluate the commands from a program file, you must execute a program file in a notebook. For details about executing program files, see Read MuPAD Procedures.