MATLAB: Store last m elemnts of a matrix to another matrix

arrayelementmatrixstore

Hi all, is there any MATLAB function to store the last m elemnts of a matrix to another matrix?
Thanks

Best Answer

B = A(end-(m-1):end);