% get root object handle root = xff; % get all documents docs = root.Documents; % iterate until found colin_brain = []; for dc = 1:numel(docs) if ischar(docs{dc}) && ... ~isempty(regexpi(docs{dc}, 'colin_brain')) colin_brain = root.Document(docs{dc}); break; end end % load anyway if isempty(colin_brain) colin_brain = neuroelf_file('c', 'colin_brain.vmr'); end