


















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































Initializing variables in assignment
statements
combination of constants, other variables, and
mathematical operations.
semicolons.
spaces or commas
4, 5, 5]
results of the statement are automatically displayed in the
command windows
e = [1, 2, 3; 4, 5, 6]
e =
1 2 3
4 5 6
Initializing with shortcut expressions
x = 1:2:
x =
1 3 5 7 9
Initializing variables with keyboard
input
Storing multidimensional arrays in
memory
array elements in
column major order
1 2 3
4 5 6
7 8 9
10 11 12
(a )
a
a( 1 , 1 )
a( 2 , 2 )
a( 1 , 2 )
a( 4 , 1 )
a( 3 , 1 )
a( 2 , 1 )
a( 4 , 3 )
a( 3 , 3 )
a( 2 , 3 )
a( 1 , 3 )
a( 4 , 2 )
a( 3 , 2 )
Accessing multidimensional arrays
with one dimension
a(5) will be 2
return different values within the same
expression.