Desktop Tools and Development Environment Previous page   Next Page

Evaluating MATLAB Commands with Notebook

After you define a MATLAB command as an input cell, or as an autoinit cell, you can evaluate it in your M-book. Use the following steps to define and evaluate a MATLAB command:

  1. Type the command into the M-book as text. For example:
  2. Position the cursor anywhere in the command. If the command is embedded in a line of text, use the mouse to select it. Then select Notebook -> Define Input Cell or press Alt+D.
  1. Notebook defines the MATLAB command as an input cell. For example:

  1. Specify the input cell to be evaluated by selecting it with the mouse or by placing the cursor in it. Then select Notebook -> Evaluate Cell or press Ctrl+Enter.
  1. Notebook evaluates the input cell and displays the results in a output cell immediately following the input cell. If there is already an output cell, Notebook replaces its contents, wherever it is in the M-book. For example:

The text in the output cell is blue and is enclosed within cell markers. Cell markers are bold, gray brackets. They differ from the brackets used to enclose matrices by their size and weight. Error messages appear in red. For information about changing these default formats, see Modifying Styles in the M-Book Template.

For more information about evaluating MATLAB commands in an M-book, see

Previous page  Converting an Input Cell to Text with Notebook Evaluating Cell Groups with Notebook Next page

© 1994-2005 The MathWorks, Inc.