Readme

You might also like

You are on page 1of 2

Welcome to the MATLAB Notebook for Word!

Version 1.6.0

This document contains information on:


1. Getting Started
2. A Brief MATLAB Example

1. Getting Started
The MATLAB Notebook is an interface for accessing MATLAB in a seamless manner
through Microsoft Word.The Notebook interface allows commands created within a Word
document to be sent to MATLAB for evaluation. The result of MATLAB's processing of
the command is returned to Word and inserted in the document. Both text and graphical
output from MATLAB are supported.

The document which you are reading is a live MATLAB Notebook or M-book. You
probably noticed that when this document was opened, the MATLAB program was
started. This is so that commands entered in the M-book can be sent to MATLAB and
evaluated.

The best place to start with the Notebook is Chapter 2 of the MATLAB Notebook User's
Guide. If you are impatient, on the next line type a MATLAB expression and press Ctrl-
Enter. Working with the Notebook is easy!

After perusing this document you will want to create an m-book of your own. To do this
select New M-book from the File menu.
2. A Brief MATLAB Example
Here's an example of mixing MATLAB commands and free form text.

Use MATLAB's magic function to generate a magic square matrix. Try changing the value in the
parenthesis and then re-evaluate this M-book by pressing Alt-R.

x=magic(12)

x =
144 2 3 141 140 6 7 137 136 10 11 133
13 131 130 16 17 127 126 20 21 123 122 24
25 119 118 28 29 115 114 32 33 111 110 36
108 38 39 105 104 42 43 101 100 46 47 97
96 50 51 93 92 54 55 89 88 58 59 85
61 83 82 64 65 79 78 68 69 75 74 72
73 71 70 76 77 67 66 80 81 63 62 84
60 86 87 57 56 90 91 53 52 94 95 49
48 98 99 45 44 102 103 41 40 106 107 37
109 35 34 112 113 31 30 116 117 27 26 120
121 23 22 124 125 19 18 128 129 15 14 132
12 134 135 9 8 138 139 5 4 142 143 1

The imagesc command creates an image of the matrix scaling the data for the colormap. For an
explanation of the imagesc command, on the next line type "help imagesc" and press Ctrl-Enter.

imagesc(x)

10

12
2 4 6 8 10 12

You might also like