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: applyKcatConstraints.m
    path of file: ./repos/GECKO/src/geckomat/change_model
    
    the code of the file until where you have to start completion: function model = applyKcatConstraints(model,updateRxns)
% applyKcatConstraints
%   Applies kcat-derived enzyme constraints to an ecModel. Existing enzyme
%   constraints are first removed (unless updateRxns is provided), and new
%   constraints are defined based on the content of model.ec.kcat.
%
% Input:
%   model       an ecModel in GECKO 3 format (with ecModel.ec structure)
%   updateRxns  if not all enzyme constraints should be updated, this can
%               be given as either a logical vector of length
%               model.ec.rxns, a vector of model.ec.rxns indices, or a
%               (cell array of) string(s) with model.ec.rxns identifiers.
%               For light models, these reactions should match model.rxns.
%
% Output:

    
function model = applyKcatConstraints(model,updateRxns)
% applyKcatConstraints
%   Applies kcat-derived enzyme constraints to an ecModel. Existing enzyme
%   constraints are first removed (unless updateRxns is provided), and new
%   constraints are defined based on the content of model.ec.kcat.
%
% Input:
%   model       an ecModel in GECKO 3 format (with ecModel.ec structure)
%   updateRxns  if not all enzyme constraints should be updated, this can
%               be given as either a logical vector of length
%               model.ec.rxns, a vector of model.ec.rxns indices, or a
%               (cell array of) string(s) with model.ec.rxns identifiers.
%               For light models, these reactions should match model.rxns.
%
% Output:
%   model       ecModel where reactions are constrained by enzyme usage
%               if a kcat value was provided for the reaction-enzyme pair
%               in model.ec.kcat
%
% Usage: model = applyKcatConstraints(model,updateRxns);

%these lines are for the nargin lines below only
if (model.ec.geckoLight)
    rxns = model.rxns;
else
    rxns = model.ec.rxns;
end