
The square brackets “[ ]” indicate the definition of the vector. Also, the space
between the vector numbers separates the vector’s elements. The comma “,”
is another way of separating the elements. Additionally, note that the default
variable
a
a
n
n
s
s
has lost its previous value in order to store the results of the
most recent operation.
As another example, enter the following command that creates a 3-by-3
magic square saved in the matrix variable
M
M:
“M=
m
m
a
a
g
g
i
i
c
c(3)”
and after pressing [Enter] you get the Matlab’s result (Figure 6):
Figure 6: A 3-by-3 magic table
The magic square is created using the element function
m
m
a
a
g
g
i
i
c
c that is
already built in Matlab.
Komentáře k této Příručce