function [oarg1,oarg2,oarg3]=rgb2im(arg1,arg2,arg3,arg4,arg5)
%RGB2IM	See RGB2IND.

%	Copyright (c) 1993 by The MathWorks, Inc.
%	$Revision: 1.5 $  $Date: 1993/10/21 12:59:32 $

args = '(arg1';
for i = 2:nargin
   args = [args, ',arg',int2str(i)];
end
args = [args ')'];
if nargout == 1 % gray scale
   oarg1 = eval(['rgb2gray',args]);
elseif nargout == 2  % indexed
   [oarg1,oarg2] = eval(['rgb2ndx',args]);
else
   oarg1 = arg1;
   oarg2 = arg2;
   oarg3 = arg3;
end
