function res = horridfunction(arg1,arg2,arg3)
switch nargin
case 0
   res = rand(1,1); 
case 1 
   res = cos(arg1);
case 2      
   res = atan2(arg1,arg2);
case 3
   res = (arg1.^2).^arg3 + arg2;
end

   