how to get only one row of a matrix matlab code example Example: copy first n column of a matrix in matlab out = your_matrix(:,[1:end])