Development Environment | ![]() ![]() |
Evaluating MATLAB Commands
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:
This is a sample M-book a = magic(3)
This is a sample M-book [a = magic(3)]
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,
This is a sample M-book. [a = magic(3) ] [a = 8 1 6 3 5 7 4 9 2 ]
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:
![]() | Converting an Input Cell to Text | Evaluating Cell Groups | ![]() |