function addAttribute(h,attribute,value)
%

%   Copyright 2014-2020 The MathWorks, Inc.

narginchk( 2, 3 );
attribute = convertStringsToChars(attribute);
if nargin==2
    value = true;
end
if ~ischar( attribute )
    error( message( 'coder_compile:toolchain:AttributeInputNotAString' ) );
end
h.Attributes.add( attribute, value );
end
