Update jointlyPadding_alg.m