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: computeCentroidMatches.m
    path of file: ./repos/ciatah/+ciapkg/+image
    
    the code of the file until where you have to start completion: function [matchIndsReal, matchIndsEst, meanDist] = computeCentroidMatches(realCellParams, estCellParams, varargin)
    % Matches real and estimates cells based on centroid location.
    % Lacey Kitsch & Biafra Ahanonu
    % started: updating 2016.04.24
    % inputs
        %
    % outputs
        %

    % changelog
        % 2016.xx - changed inputs to getOptions format
        % 2021.08.08 [19:30:20] - Updated to handle CIAtah v4.0 switch to all functions inside ciapkg package.
    % TODO
        %

    import ciapkg.api.* % import CIAtah functions in ciapkg package API.

    %========================
    options.maxDistanceForMatch = 4;

    options.cellDistances = [];

    options.exclusionDistanceReal = 1e2;

    options.exclusionDistanceOther = 1e4;

    options.d = [];
    % get options
    options = getOptions(options,varargin);
    % display(options)

    
function [matchIndsReal, matchIndsEst, meanDist] = computeCentroidMatches(realCellParams, estCellParams, varargin)
    % Matches real and estimates cells based on centroid location.
    % Lacey Kitsch & Biafra Ahanonu
    % started: updating 2016.04.24
    % inputs
        %
    % outputs
        %

    % changelog
        % 2016.xx - changed inputs to getOptions format
        % 2021.08.08 [19:30:20] - Updated to handle CIAtah v4.0 switch to all functions inside ciapkg package.
    % TODO
        %

    import ciapkg.api.* % import CIAtah functions in ciapkg package API.

    %========================
    options.maxDistanceForMatch = 4;

    options.cellDistances = [];

    options.exclusionDistanceReal = 1e2;

    options.exclusionDistanceOther = 1e4;

    options.d = [];
    % get options
    options = getOptions(options,varargin);
    % display(options)
    % unpack options into current workspace
    % fn=fieldnames(options);
    % for i=1:length(fn)
    %   eval([fn{i} '=options.' fn{i} ';']);
    % end