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: spm_mkdir.m
    path of file: ./repos/ExploreASL/External/SPMmodified
    
    the code of the file until where you have to start completion: function sts = spm_mkdir(varargin)
% Make new directory trees
% FORMAT sts = spm_mkdir(dir,...)
% dir    - character array, or cell array of strings
%

    
function sts = spm_mkdir(varargin)
% Make new directory trees
% FORMAT sts = spm_mkdir(dir,...)
% dir    - character array, or cell array of strings
%
% sts    - true if all directories were successfully created or already
%          existing, false otherwise.
%__________________________________________________________________________
% Copyright (C) 2017 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: spm_mkdir.m 7088 2017-06-01 16:18:44Z guillaume $


sts = true;
if nargin > 0
    d1 = cellstr(varargin{1});
    for i=1:numel(d1)
        if ~exist(spm_select('cpath',d1{i}),'dir')
            status = mkdir(d1{i});
            sts = sts & status;
        end