We have moved to @ Placement Papers Hub !! Visit our new website here for more..

Matlab Matrix Indexing row&column


*A(m, :) give the all values of mth row
*A(:, n) give the all values of nth column

>> Z=[4 5 6; 8 8 6; 5 8 3]

Z =

     4     5     6
     8     8     6
     5     8     3

*A(m, :) give the all values of mth row
>> Z(3,:)

ans =

     5     8     3

*A(:, n) give the all values of nth column

>> Z(:,3)

ans =

     6
     6
     3