Skip to content

Commit

Permalink
Sort the stimulation list by modified time in descending order.
Browse files Browse the repository at this point in the history
Show newer first.
  • Loading branch information
ningfei committed May 5, 2018
1 parent bf06f47 commit 85fbfdd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ea_detstimname.m
Expand Up @@ -11,6 +11,8 @@
stimname = cell(0);
if exist([directory,'stimulations'],'dir')
stimdir = dir([directory,'stimulations']);
[~, ind] = sort([stimdir(:).datenum], 'descend'); % show the latest modified first
stimdir = stimdir(ind);
stimname = {stimdir(cell2mat({stimdir.isdir})).name};
stimname = stimname(cellfun(@(x) ~strncmp(x,'.',1) && ~strncmp(x,'gs_',3), stimname));
end
Expand Down

0 comments on commit 85fbfdd

Please sign in to comment.