0001 function poplabels = dsGet_populations_from_meta(xp) 0002 poplabels = {}; 0003 if ~isempty(xp.meta.dynasim) 0004 if ~isempty(xp.meta.dynasim.labels) 0005 myabels = xp.meta.dynasim.labels; 0006 mylabels = myabels(~strcmpi(myabels,'time')); % Remove time 0007 inds = cellfun(@(s) strfind(s,'_'),mylabels,'UniformOutput',0); 0008 poplabels = cellfun(@(s,ind) s(1:ind-1),mylabels,inds,'UniformOutput',0); 0009 end 0010 end 0011 end