Desktop Tools and Development Environment |

**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:

- Type the command into the M-book as text. For example:
- 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**.

- 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**.

- 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

- Evaluating Cell Groups with Notebook
- Evaluating a Range of Input Cells with Notebook
- Evaluating a Calc Zone with Notebook
- Evaluating an Entire M-Book
- Using a Loop to Evaluate Input Cells Repeatedly with Notebook.
- Converting Output Cells to Text with Notebook
- Deleting Output Cells with Notebook

Converting an Input Cell to Text with Notebook | Evaluating Cell Groups with Notebook |

© 1994-2005 The MathWorks, Inc.