1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- % EZmultiDayGui.m called by EZexpSel.m
- % EZmultiday is called after this EZmultiDayGui.m also by EZexpSel.m
- function EZmultiDayGui
- global exDlst
- global exFolder
- global expType
- global scansDir
- xPos=0.05;
- btnWid=0.10;
- btnHt=0.05;
- spacing=0.02; % Spacing between the button and the next command's label
- btnNumber=1;
- yPos=0.85-(btnNumber-1)*(btnHt+spacing);
- btnPos=[xPos yPos-spacing btnWid btnHt];
- datacursormode off;
- exDirs=dir(exFolder);
- exFs={exDirs.name};
- exFs=exFs(3:end);
- % Re-Sort Experiments by 'D__' Day
- if expType==2
- exFs
- ii=1;
- for i=1:size(exFs,2)
- position=strfind(exFs(i),'_D');
- if ~isempty(cell2mat(position)) && isnumeric(cell2mat(position))
- da=char(exFs(i));
- ff(ii)=sscanf(da((cell2mat(position)+2):end),'%d');
- expDayFs(ii)=exFs(i);
- indxx(ii)=ii;
- selFindx=nonzeros(indxx);
- ii=ii+1;
- end
- end
- BB=[ff;selFindx'];
- BB=BB';
- CC=sortrows(BB,1);
- j=1;
- for i=1:size(CC,1)
- j=CC(i,2);
- ExpOrderByExp(i)=expDayFs(j); %exFs(j)
- end
- else
- ExpOrderByExp=sort(exFs);
- end
- f=figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' );
- hListbox=uicontrol(...
- 'Style', 'listbox',...
- 'String',ExpOrderByExp,...
- 'value',[],...
- 'max',1000,...
- 'min',1,...
- 'Units','normalized',...
- 'Position', [.70 .40 .6 .60],...
- 'callback',{@load_listbox}); %'uiresume(gcbf)'); 'Position', [5 100 60 20])
-
- function load_listbox(source,eventdata)
- userIndx=(get(source,'value'));
- userStr=(get(source,'string'));
- user_entry=userStr(userIndx);
- exDlst=user_entry;
- end
-
- exFs
- btnNumber=10;
- yPos=0.85-(btnNumber-1)*(btnHt+spacing);
- btnPos=[xPos yPos-spacing btnWid btnHt];
- hedit8=uicontrol(...
- 'Style', 'pushbutton',...
- 'String',{'Continue'},...
- 'Units','normalized',...
- 'Position', btnPos,...
- 'callback','uiresume(gcbf)');
- uiwait(gcf);
- close(f)
- end
|