add pairwise metrics to matlab port