function mustBeVector(A,allowEmpty)
%MATLAB Code Generation Library Function

%#codegen

%   Copyright 2021 The MathWorks, Inc.

    coder.internal.allowEnumInputs;
    coder.internal.allowHalfInputs;
    coder.internal.prefer_const(allowEmpty);
    emptyAllowedAndIsEmpty = false;
    if nargin == 2
        coder.internal.assert(coder.internal.matchStringParameter(allowEmpty,"allow-all-empties"), ...
            'MATLAB:validatorUsage:invalidSecondInput', 'mustBeVector', 'allow-all-empties');
        if isempty(A)
            emptyAllowedAndIsEmpty = true;
        end
    end
    coder.internal.assert(emptyAllowedAndIsEmpty || isvector(A),'MATLAB:validators:mustBeVector');
end
