Create mergeFactors.m