>> a=[1 2 3 4;5 6 7 8;9 10 11 12;13 14 15 16]
a =
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
>> a(2:4,3:4)
ans =
7 8
11 12
15 16
In the above example the elements in rows 2, 3 and 4, and columns 3 and 4 are extracted.