samestructure_byname function

Test whether matrices or lists of matrices have same structure