Open MuPAD Notebooks

Note

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

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Before opening a MuPAD notebook, it is best to decide which interface you intend to use primarily for your task. The two approaches are:

  • Perform your computations in the MATLAB Live Editor using MuPAD notebooks as an auxiliary tool. This approach is recommended and implies that you open a MuPAD notebook, and then execute it, transfer data and results, or close it from the MATLAB Live Editor. If you perform computations in both interfaces, use handles to notebooks. The toolbox uses these handles for communication between the MATLAB workspace and the MuPAD notebook.

  • Perform your computations and obtain the results in MuPAD. This approach is not recommended. It implies that you use the MATLAB Live Editor only to access the MuPAD Notebook app, but do not intend to copy data and results between MATLAB and MuPAD. If you use the MATLAB Live Editor only to open a notebook, and then perform all your computations in that notebook, you can skip using a handle.

    Tip

    MuPAD notebook files open in an unevaluated state. In other words, the notebook is not synchronized with its engine when it opens. To synchronize a notebook with its engine, select Notebook > Evaluate All or use evaluateMuPADNotebook. For details, see Evaluate MuPAD Notebooks from MATLAB.

When you open a MuPAD notebook, you can choose to use MATLAB live script instead.

If you opened a MuPAD notebook without creating a handle, and then realized that you need to transfer data and results between MATLAB and MuPAD, use allMuPADNotebooks to create a handle to this notebook:

mupad
nb = allMuPADNotebooks
nb = 
Notebook1

This approach does not require saving changes in the notebook. Alternatively, you can save the notebook and open it again, this time creating a handle.

If You Need Communication Between Interfaces

The following commands are also useful if you lose the handle to a notebook, in which case, you can save the notebook file and then reopen it with a new handle.

Use the mupad or openmn Command

Open an existing MuPAD notebook file and create a handle to it by using mupad or openmn in the MATLAB Command Window:

nb = mupad('file_name')
nb1 = openmn('file_name')

Here, file_name must be a full path, such as H:\Documents\Notes\myNotebook.mn, unless the notebook is in the current folder.

To open a notebook and automatically jump to a particular location, create a link target at that location inside a notebook, and refer to it when opening a notebook. For information about creating link targets, see Work with Links. To refer to a link target when opening a notebook, enter:

nb = mupad('file_name#linktarget_name')
nb = openmn('file_name#linktarget_name')

Use the open Command

Open an existing MuPAD notebook file and create a handle to it by using the open function in the MATLAB Command Window:

nb1 = open('file_name')

Here, file_name must be a full path, such as H:\Documents\Notes\myNotebook.mn, unless the notebook is in the current folder.

If You Use MATLAB to Access MuPAD

Double-Click the File Name

You can open an existing MuPAD notebook, program file, or graphic file (.xvc or .xvz) by double-clicking the file name. The system opens the file in the appropriate interface.

Use the mupad or openmn Command

Open an existing MuPAD notebook file by using the mupad or openmn function in the MATLAB Command Window:

mupad('file_name')
openmn('file_name')

Here, file_name must be a full path, such as H:\Documents\Notes\myNotebook.mn, unless the notebook is in the current folder.

To open a notebook and automatically jump to a particular location, create a link target at that location inside a notebook, and refer to it when opening a notebook. For information about creating link targets, see Work with Links. To refer to a link target when opening a notebook, enter:

mupad('file_name#linktarget_name')
openmn('file_name#linktarget_name')

Use the open Command

Open an existing MuPAD notebook file by using open in the MATLAB Command Window:

open('file_name')

Here, file_name must be a full path, such as H:\Documents\Notes\myNotebook.mn, unless the notebook is in the current folder.

Use the Welcome to MuPAD Dialog Box

The Welcome to MuPAD dialog box lets you create a new notebook or program file, open an existing notebook or program file, and access documentation. To open this dialog box, type mupadwelcome in the MATLAB Command Window.

Open Notebooks in MuPAD

If you already opened a notebook, you can start new notebooks and open existing ones without switching to the MATLAB Live Editor. To open an existing notebook, select File > Open from the main menu or use the toolbar. Also, you can open the list of notebooks you recently worked with.

Open MuPAD Program Files and Graphics

Besides notebooks, MuPAD lets you create and use program files (.mu) and graphic files (.xvc or .xvz). Also, you can use the MuPAD Debugger to diagnose problems in your MuPAD code.

Do not use a handle when opening program files and graphic files because there is no communication between these files and the MATLAB Live Editor.

Double-Click the File Name

You can open an existing MuPAD notebook, program file, or graphic file by double-clicking the file name. The system opens the file in the appropriate interface.

Use the openmn Command

Symbolic Math Toolbox™ provides these functions for opening MuPAD files in the interfaces with which these files are associated:

  • openmu opens a program file with the extension .mu in the MATLAB Editor.

  • openxvc opens an XVC graphic file in the MuPAD Graphics window.

  • openxvz opens an XVZ graphic file in the MuPAD Graphics window.

For example, open an existing MuPAD program file by using the openmu function in the MATLAB Command Window:

openmu('H:\Documents\Notes\myProcedure.mu')

You must specify a full path unless the file is in the current folder.

Use the open Command

Open an existing MuPAD file by using open in the MATLAB Command Window:

open('file_name')

Here, file_name must be a full path, such as H:\Documents\Notes\myProcedure.mu, unless the notebook is in the current folder.

Use the Welcome to MuPAD Dialog Box

The Welcome to MuPAD dialog box lets you create a new notebook or program file, open an existing notebook or program file, and access documentation. To open this dialog box, type mupadwelcome in the MATLAB Command Window.

Open Program Files and Graphics from MuPAD

If you already opened a notebook, you can create new notebooks and program files and open existing ones without switching to the MATLAB Command Window. To open an existing file, select File > Open from the main menu or use the toolbar.

You also can open the Debugger window from within a MuPAD notebook. For details, see Open the Debugger.

Note

You cannot access the MuPAD Debugger from the MATLAB Command Window.