function y = colon(varargin)
% MATLAB Code Generation Library Function
%
% COLON Colon operation for fi object

%   Copyright 2007-2014 The MathWorks, Inc.
%#codegen

coder.internal.prefer_const(varargin);
eml_allow_mx_inputs;    

eml_invariant((nargin == 2) || (nargin == 3), 'fixed:coder:incorrectNumberOfInputs');

% Check for ambiguous types and return with the correct size output
if eml_ambiguous_types
    if nargin == 2
        y = colon(double(varargin{1}), double(varargin{2})); % built-in colon
    else
        y = colon(double(varargin{1}), double(varargin{2}), double(varargin{3})); % built-in colon
    end
else
    y = eml_colonhelper(true, varargin{:});
end
