MATLAB: Command to delete last row and column of a matrix

deletematrix manipulation

Hi,
Can anyone help me with the command to delete the last row and column of a 6 x 6 matrix?
Regards
Swati

Best Answer

A(:,end) = []; %Delete last column
A(end,:) = []; %Delete last row