function z = merge(a,b) %UNTITLED Summary of this function goes here % Detailed explanation goes here a=[a, max(b)+1]; b=[b, max(a)+1]; i=1; j=1; if a(1)