trim_rows_cols function

Trim rows and/or columns from a matrix