You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: addCst.m
    path of file: ./repos/Point_cloud_tools_for_Matlab/classes/@lsAdj
    
    the code of the file until where you have to start completion: function idxCst = addCst(obj, cst2add)
% ADDCST Add constant(s) to problem

noCst2add = numel(cst2add); % no. of constants to add

% Add constants with 'direct indexing' (faster than other methods)

    
function idxCst = addCst(obj, cst2add)
% ADDCST Add constant(s) to problem

noCst2add = numel(cst2add); % no. of constants to add

% Add constants with 'direct indexing' (faster than other methods)
% Indices
if isempty(obj.cst)
    idxCst2add = 1:noCst2add;
else
    noCst = numel(obj.cst); % actual no. of constants
    idxCst2add = noCst+1:noCst+noCst2add;
end