function y = isfixed(x)
% MATLAB Code Generation Library function.

%ISFIXED  True for FI object with "fixed" as the datatype input.
%   ISFIXED(X) returns 1 if X is a FI object with datatype == fixed;
%              and 0 if X is a FI object with datatype != fixed.
%
%   Examples:
%     x = fi(pi, 'DataType','fixed');
%     isfixed(x)
%
%   Copyright 2002-2014 The MathWorks, Inc.
%#codegen

coder.extrinsic('strcmpi');

eml_invariant(nargin == 1, 'fixed:coder:incorrectNumberOfInputs');

T = eml_typeof(x);
y = coder.const(strcmpi(get(T, 'DataType'), 'Fixed'));

