Link segments to matrix