How to remove Matrix rows or columns