%% Index Matrix Rows and Columns
% Examine several ways to index a matrix using a colon :.
% Create a 3-by-3 matrix. Index the first row.

A = magic(3)

%

A(1,:)

%
% Index the second and third column.

A(:,2:3)

%
% Reshape the matrix into a column vector.

A(:)

% Copyright 2012 The MathWorks, Inc.