filter matrix by name