Command to delete last row and column of a matrix
Show older comments
Hi,
Can anyone help me with the command to delete the last row and column of a 6 x 6 matrix?
Regards
Swati
Accepted Answer
More Answers (1)
Bhaskar R
on 28 Jan 2020
your_matrix(end, :) = []; % deletes your matrix end(last) row
your_matrix(:, end) = []; % deletes your matrix end(last) column
2 Comments
Swati Sarangi
on 28 Jan 2020
Bhaskar R
on 28 Jan 2020
Its a MATLAB syntax to remove elements from the matrix. For more info read
Categories
Find more on Sparse Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!