function D = realmaxLike(X)
%REALMAXLIKE realmaxLike codistributed array
%   
%   D = realmaxLike(P) is a codistributed scalar with the value of realmax for the
%   underlyingType of P and matching all other attributes.
%   
%   P must have floating-point underlying type.
%   
%   See also REALMAX, CODISTRIBUTED.


%   Copyright 2021 The MathWorks, Inc.

if ~isfloat(X)
    error(message("MATLAB:realmax:invalidPrototype"));
end
D = buildScalarLike(@realmax, X);