Equality of higher-rank numerical ranges of matrices