You are on page 1of 3

Welcome to the MATLAB Notebook for Word!

Version 1.5.2

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 CtrlEnter. 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 =
Columns 1 through 8
144
2
3
141
13
131
130
16
25
119
118
28
108
38
39
105
96
50
51
93
61
83
82
64
73
71
70
76
60
86
87
57
48
98
99
45
109
35
34
112
121
23
22
124
12
134
135
9
Columns 9 through 12
136
10
11
133
21
123
122
24
33
111
110
36
100
46
47
97
88
58
59
85
69
75
74
72
81
63
62
84
52
94
95
49
40
106
107
37
117
27
26
120
129
15
14
132
4
142
143
1

140
17
29
104
92
65
77
56
44
113
125
8

6
127
115
42
54
79
67
90
102
31
19
138

7
126
114
43
55
78
66
91
103
30
18
139

137
20
32
101
89
68
80
53
41
116
128
5

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

10

12

You might also like