function [max,min] = minmax(a, b)
   if(a >= b )
        max = a;
        min = b;
        return;
   else
        max = b;
        min = a;
        return;
   end
end
