Hide Code Lines

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

You can run MuPAD® commands without displaying them in a notebook. MuPAD evaluates these commands every time you start a notebook engine. To specify the commands you want to execute invisibly:

  1. Select File>Properties.

  2. In the Start Up Commands field of the Notebook Properties dialog box, specify the commands you want to run without displaying in the notebook. Alternatively, attach an existing file containing the commands.

    • A MuPAD uses this title only when exporting a notebook to HTML.

    • B Attach an existing file with the MuPAD script that you want to execute invisibly at the notebook startup.

    • C Type the commands that you want to execute invisibly at the notebook startup.

  3. Save the notebook. MuPAD saves the hidden code with the notebook. This code does not affect other notebooks. If you want to use hidden code for all notebooks, see Adding Hidden Startup Commands to All Notebooks.

To execute the commands you entered, restart the notebook engine. To restart an engine you can use one of the following methods:

  • Select Notebook>Disconnect, and then Notebook>Start Engine.

  • Close the notebook and reopen it.

After you restart an engine, you can access all the objects defined in the Notebook Properties dialog box from your notebook.