allMuPADNotebooks

All open notebooks

Syntax

Description

example

L = allMuPADNotebooks returns a vector with handles (pointers) to all currently open MuPAD® notebooks.

If there are no open notebooks, allMuPADNotebooks returns an empty object [ empty mupad ].

Examples

expand all

Identify All Open Notebooks

Get a vector of handles to all currently open MuPAD notebooks.

Suppose that your current folder contains MuPAD notebooks named myFile1.mn and myFile2.mn. Open them keeping their handles in variables nb1 and nb2, respectively. Also create a new notebook with the handle nb3:

nb1 = mupad('myFile1.mn')
nb2 = mupad('myFile2.mn')
nb3 = mupad
nb1 = 
myFile1

nb2 = 
myFile2

nb3 = 
Notebook1

Suppose that there are no other open notebooks. Use allMuPADNotebooks to get a vector of handles to these notebooks:

allNBs = allMuPADNotebooks
allNBs = 
myFile1
myFile2
Notebook1

Create a Handle to an Existing Notebook

If you already created a MuPAD notebook without a handle or if you lost the handle to a notebook, use allMuPADNotebooks to create a new handle. Alternatively, you can save the notebook, close it, and then open it again using a handle.

Create a new notebook:

mupad

Suppose that you already performed some computations in that notebook, and now want to transfer a few variables to the MATLAB® workspace. To be able to do it, you need to create a handle to this notebook:

nb = allMuPADNotebooks
nb = 
Notebook1

Now, you can use nb when transferring data and results between the notebook Notebook1 and the MATLAB workspace. This approach does not require you to save Notebook1.

getVar(nb,'x')
ans =
x

Output Arguments

expand all

L — All open MuPAD notebooksvector of handles to notebooks

All open MuPAD notebooks, returned as a vector of handles to these notebooks.

Was this topic helpful?