Desktop Tools and Development Environment Previous page   Next Page

Creating or Opening an M-Book

Creating an M-Book from MATLAB

To create a new M-book from within MATLAB, type

notebook

at the prompt. If you are running Notebook for the first time, you may need to configure it. See Configuring Notebook for more information.

Notebook starts Microsoft Word on your system and creates a new M-book, called Document1.

When Word is opening, if a dialog box appears asking you to enable or disable macros, choose to enable macros. Notebook defines Microsoft Word macros that enable MATLAB to interpret the different types of cells that hold MATLAB commands and their output. For more information on macro security, see Configuring Notebook.

Notebook adds the Notebook menu to the Word menu bar. Use this menu, illustrated below, to access Notebook features.

Image of an empty document in Microsoft Word, with the Notebook menu displayed.

Creating an M-Book While Running Notebook

With Notebook running, you can create a new M-book by selecting New M-book from the Word File menu.

Opening an Existing M-Book

You can use the notebook command to open an existing M-book

notebook filename

where filename is the M-book you want to open. Or you can double-click an M-book file in a Windows file management tool, such as Explorer.

Image of empty document in Microsoft Word with File menu and ithe item New M-book selected.

When you double-click on an M-book, Microsoft Word opens the M-book and starts MATLAB if it is not already running. Notebook adds the Notebook menu to the Word menu bar and adds New M-book to the File menu.

Converting a Word Document to an M-Book

To convert a Word document to an M-book, follow these steps:

  1. Create a new M-book.
  2. From the Insert menu, select the File.
  3. Select the file you want to convert.
  4. Click OK.

Previous page  Notebook for Publishing to Word Entering MATLAB Commands in an M-Book Next page

© 1994-2005 The MathWorks, Inc.