get_matrix function

Extract matrices from a fit