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: arDeleteObsoleteMexfkt.m
    path of file: ./repos/d2d/arFramework3/Advanced
    
    the code of the file until where you have to start completion: % arDeleteObsoleteMexfkt
%
% This function deletes the mex-binaries in the basic folder which do not
% occur in any workspace in the results folder as ar.fkt
%
% This function is helpful, if a lot of such binaries were produced during
% model-selection by multiple changes of the def files.

function arDeleteObsoleteMexfkt

global ar

d = dir('Results');
d = d([d.isdir]==1);
folders 
    
function deletes the mex-binaries in the basic folder which do not
% occur in any workspace in the results folder as ar.fkt
%
% This function is helpful, if a lot of such binaries were produced during
% model-selection by multiple changes of the def files.

function arDeleteObsoleteMexfkt

global ar

d = dir('Results');
d = d([d.isdir]==1);
folders = setdiff({d.name},{'.','..'});


fkt = cell(size(folders));
for f=1:length(folders)   
    if exist(['Results',filesep,folders{f},filesep,'workspace.mat'],'file')
        tmp = load(['Results',filesep,folders{f},filesep,'workspace.mat'],'ar');
        doload = true;
    elseif exist(['Results',filesep,folders{f},filesep,'workspace_pars_only.mat'],'file')
        doload = true;
        tmp = load(['Results',filesep,folders{f},filesep,'workspace_pars_only.mat'],'ar');
    else
        doload = false;
        fprintf('No proper workspace found in Results folder %s\n',folders{f});
    end