function mustBeFinite(A)
%MUSTBEFINITE Validate that value is finite
%   MUSTBEFINITE(A) throws an error if A contains nonfinite values.
%   MATLAB calls isfinite to determine if A is finite.
%
%   Class support:
%   All numeric classes, logical, char
%   MATLAB classes that define a isfinite method.
%    
%   See also ISFINITE.

%   Copyright 2019-2020 The MathWorks, Inc.

    if ~all(isfinite(A),'all')
        throwAsCaller(createValidatorException('MATLAB:validators:mustBeFinite'));
    end
end
