% Recursirve Sorting by merging : sort_merge (sort_imerge is more 
% space efficient)

function A=sort_merge(A)
  n=length(A);
  if (n>1)
    m=floor((1+n)/2);
    L=sort_merge(A(1:m));
    R=sort_merge(A(m+1:n));
    A=merge(L,R);
  end
end

