Examples of Matlab Indexing
[rows,cols] = size(M); % M is a rows x cols matrix
Accessing entry at row i, column j:
x = M(i,j);
Accessing all items on row i:
r = M(i,:);
Accessing all items on column j:
c = M(:,j);
Accessing entry at row i, column j, treating M as a vector:
x = M(rows*(j-1)+i);
Accessing the sub-matrix from row i to row j and from column p to column q:
S = M(i:j,p:q);
Accessing the entire matrix (redundant):
M = M(:,:);
Explanation
The colon operator either gives a range of indices (1:2 is the indices in range 1 to 2, inclusive, while 3:5 gives the range 3, 4, 5) or it gives the entire range for the given dimension if no range is specified.
This, in conjunction to the fact that indexing a matrix with just a single index gives you the entry that would result from stepping through that many entries (going down the rows, incrementing the column and resetting the row after the last row) instead of giving you just the specified row/column leads to your observations.