filter_mdb_matrix function

Filter a matrix stored in an MDB