Example of Linear indexing:
For illustration, the following substitutes the whole second row with values from a vector The whole row or column could also be changed:
>> mat(2,:) = 5:7
2 11 4
5 6 7
Note that as the whole row is being modified, a vector with the correct length should be assigned.