function lsbxfi = lsb(xfi)
% MATLAB Code Generation Library function for @fi/lsb.
%
% LSB(A) will return the lsb of the fi A

% $INCLUDE(DOC) toolbox/eml/lib/fixedpoint/lsb.m $
% Copyright 2002-2014 The MathWorks, Inc.
%#codegen
 
eml_allow_mx_inputs;

% Check for nargin and assert if not 1
eml_invariant(nargin == 1, 'fixed:coder:incorrectNumberOfInputs');

if eml_ambiguous_types
    lsbxfi = coder.ignoreConst(zeros(size(xfi)));
    return;
end

eml_invariant(isfi(xfi), 'fixed:coder:functionNotDefinedFor1stArgType', 'lsb', class(xfi));

check4scalarInput = true; % non-scalar (vector & matrix) inputs not allowed
                          % for fixed-point FIs
lsbxfi            = eml_fi_eps_lsb(xfi,'lsb',check4scalarInput);

%----------------------------------------------------
