Home > . > prt_data_conditions.m

prt_data_conditions

PURPOSE ^

PRT_DATA_CONDITIONS M-file for prt_data_conditions.fig

SYNOPSIS ^

function varargout = prt_data_conditions(varargin)

DESCRIPTION ^

 PRT_DATA_CONDITIONS M-file for prt_data_conditions.fig
 
 PRT_DATA_CONDITIONS, by itself, creates a new PRT_DATA_CONDITIONS or 
 raises the existing singleton*.

 H = PRT_DATA_CONDITIONS returns the handle to a new PRT_DATA_CONDITIONS 
 or the handle to the existing singleton*.

 PRT_DATA_CONDITIONS('CALLBACK',hObject,eventData,handles,...) calls the 
 local function named CALLBACK in PRT_DATA_CONDITIONS.M with the given 
 input arguments.

 PRT_DATA_CONDITIONS('Property','Value',...) creates a new 
 PRT_DATA_CONDITIONS or raises the existing singleton*.  Starting from the
 left, property value pairs are applied to the GUI before 
 prt_data_conditions_OpeningFcn gets called.  An unrecognized property name
 or invalid value makes property application stop.  All inputs are passed 
 to prt_data_conditions_OpeningFcn via varargin.

 *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
  instance to run (singleton)".

 See also: GUIDE, GUIDATA, GUIHANDLES
_______________________________________________________________________
 Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = prt_data_conditions(varargin)
0002 % PRT_DATA_CONDITIONS M-file for prt_data_conditions.fig
0003 %
0004 % PRT_DATA_CONDITIONS, by itself, creates a new PRT_DATA_CONDITIONS or
0005 % raises the existing singleton*.
0006 %
0007 % H = PRT_DATA_CONDITIONS returns the handle to a new PRT_DATA_CONDITIONS
0008 % or the handle to the existing singleton*.
0009 %
0010 % PRT_DATA_CONDITIONS('CALLBACK',hObject,eventData,handles,...) calls the
0011 % local function named CALLBACK in PRT_DATA_CONDITIONS.M with the given
0012 % input arguments.
0013 %
0014 % PRT_DATA_CONDITIONS('Property','Value',...) creates a new
0015 % PRT_DATA_CONDITIONS or raises the existing singleton*.  Starting from the
0016 % left, property value pairs are applied to the GUI before
0017 % prt_data_conditions_OpeningFcn gets called.  An unrecognized property name
0018 % or invalid value makes property application stop.  All inputs are passed
0019 % to prt_data_conditions_OpeningFcn via varargin.
0020 %
0021 % *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
0022 %  instance to run (singleton)".
0023 %
0024 % See also: GUIDE, GUIDATA, GUIHANDLES
0025 %_______________________________________________________________________
0026 % Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory
0027 
0028 % Written by J.Schrouff
0029 % $Id: prt_data_conditions.m 555 2012-06-12 08:44:51Z cphillip $
0030 
0031 % Edit the above text to modify the response to help prt_data_conditions
0032 
0033 % Last Modified by GUIDE v2.5 26-Oct-2011 15:47:56
0034 
0035 % Begin initialization code - DO NOT EDIT
0036 gui_Singleton = 1;
0037 gui_State = struct('gui_Name',       mfilename, ...
0038                    'gui_Singleton',  gui_Singleton, ...
0039                    'gui_OpeningFcn', @prt_data_conditions_OpeningFcn, ...
0040                    'gui_OutputFcn',  @prt_data_conditions_OutputFcn, ...
0041                    'gui_LayoutFcn',  [] , ...
0042                    'gui_Callback',   []);
0043 if nargin && ischar(varargin{1})
0044     gui_State.gui_Callback = str2func(varargin{1});
0045 end
0046 
0047 if nargout
0048     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0049 else
0050     gui_mainfcn(gui_State, varargin{:});
0051 end
0052 % End initialization code - DO NOT EDIT
0053 
0054 
0055 % --- Executes just before prt_data_conditions is made visible.
0056 function prt_data_conditions_OpeningFcn(hObject, eventdata, handles, varargin)
0057 % This function has no output args, see OutputFcn.
0058 % hObject    handle to figure
0059 % eventdata  reserved - to be defined in a future version of MATLAB
0060 % handles    structure with handles and user data (see GUIDATA)
0061 % varargin   command line arguments to prt_data_conditions (see VARARGIN)
0062 
0063 % Choose default command line output for prt_data_conditions
0064 handles.output = hObject;
0065 
0066 %if window already exists, just put it as the current figure
0067 Tag='DDcond';
0068 F = findall(allchild(0),'Flat','Tag',Tag);
0069 if length(F) > 1
0070     % Multiple Graphics windows - close all but most recent
0071     close(F(2:end))
0072     F = F(1);
0073     uistack(F,'top')
0074 elseif length(F)==1
0075     uistack(F,'top')
0076 else
0077     set(handles.figure1,'Tag',Tag)
0078     %build figure when it doesn't exist yet
0079 set(handles.figure1,'Name','PRoNTo :: Specify conditions')
0080 set(handles.condmenu,'String',{'Specify','From .mat file'})
0081 set(handles.condmenu,'Value',2)
0082 %set size of the window, taking screen resolution and platform into account
0083 S0= spm('WinSize','0',1);   %-Screen size (of the current monitor)
0084 if ispc
0085     PF ='MS Sans Serif';
0086 else
0087     PF = spm_platform('fonts');     %-Font names (for this platform)
0088     PF = PF.helvetica;
0089 end
0090 tmp  = [S0(3)/1280 (S0(4))/800];
0091 ratio=min(tmp)*[1 1 1 1];
0092 FS = 1 + 0.85*(min(ratio)-1);  %factor to scale the fonts
0093 x=get(handles.figure1,'Position');
0094 set(handles.figure1,'DefaultTextFontSize',FS*12,...
0095     'DefaultUicontrolFontSize',FS*12,...
0096     'DefaultTextFontName',PF,...
0097     'DefaultAxesFontName',PF,...
0098     'DefaultUicontrolFontName',PF)
0099 set(handles.figure1,'Position',ratio.*x)
0100 set(handles.figure1,'Resize','on')
0101 
0102 % Choose the color of the different backgrounds and figure parameters
0103 color=prt_get_defaults('color');
0104 set(handles.figure1,'Color',color.bg1)
0105 aa=get(handles.figure1,'children');
0106 for i=1:length(aa)
0107     if strcmpi(get(aa(i),'type'),'uipanel')
0108         set(aa(i),'BackgroundColor',color.bg2)
0109         bb=get(aa(i),'children');
0110         if ~isempty(bb)
0111             for j=1:length(bb)
0112                 if ~isempty(find(strcmpi(get(bb(j),'Style'),{'text',...
0113                         'radiobutton','checkbox'}))) 
0114                     set(bb(j),'BackgroundColor',color.bg2)
0115                 elseif ~isempty(find(strcmpi(get(bb(j),'Style'),'pushbutton'))) 
0116                     set(bb(j),'BackgroundColor',color.fr)
0117                 end
0118                 set(bb(j),'FontUnits','pixel')
0119                 xf=get(bb(j),'FontSize');
0120                 set(bb(j),'FontSize',ceil(FS*xf),'FontName',PF,...
0121                     'FontUnits','normalized','Units','normalized')
0122             end
0123         end
0124     elseif strcmpi(get(aa(i),'type'),'uicontrol')
0125         if ~isempty(find(strcmpi(get(aa(i),'Style'),{'text',...
0126                 'radiobutton','checkbox','listbox'})))
0127             set(aa(i),'BackgroundColor',color.bg1)
0128         elseif ~isempty(find(strcmpi(get(aa(i),'Style'),'pushbutton')))
0129             set(aa(i),'BackgroundColor',color.fr)
0130         end
0131     end
0132     set(aa(i),'FontUnits','pixel')
0133     xf=get(aa(i),'FontSize');
0134     if ispc
0135         set(aa(i),'FontSize',ceil(FS*xf),'FontName',PF,...
0136             'FontUnits','normalized','Units','normalized')
0137     else
0138         set(aa(i),'FontSize',ceil(FS*xf),'FontName',PF,...
0139             'Units','normalized')
0140     end
0141 end
0142 
0143 
0144 
0145 handles.cond=struct();
0146 if ~isempty(varargin) && strcmpi(varargin{1},'UserData')
0147     des=varargin{2}{1};
0148     szn=length(des.conds);    
0149     dat=cell(szn,4);
0150     for i=1:szn
0151         try
0152             dat{i,1}=des.conds(i).cond_name;
0153         catch
0154             dat{i,1}=['cond ',num2str(i)];
0155         end
0156         handles.cond(i).cond_name=dat{i,1};
0157         try
0158             temp=[];
0159             for j=1:length(des.conds(i).durations)
0160                 temp=[temp, ' ',num2str(des.conds(i).durations(j),3)];
0161             end
0162             dat{i,3}=temp;
0163             handles.cond(i).durations=des.conds(i).durations;
0164         catch
0165             dat{i,3}='NaN';
0166             handles.cond(i).durations=[];
0167         end
0168         try
0169             temp=[];
0170             for j=1:length(des.conds(i).onsets)
0171                 temp=[temp, ' ',num2str(des.conds(i).onsets(j),3)];
0172             end
0173             dat{i,2}=temp;
0174             handles.cond(i).onsets=des.conds(i).onsets;
0175         catch
0176             dat{i,2}='NaN';
0177             handles.cond(i).onsets=[];
0178         end
0179         try
0180             temp=[];
0181             for j=1:length(des.conds(i).rt_trial)
0182                 temp=[temp, ' ',num2str(des.conds(i).rt_trial(j),3)];
0183             end
0184             dat{i,4}=temp;
0185             handles.cond(i).rt_trial=des.conds(i).rt_trial;
0186         catch
0187             dat{i,4}='NaN';
0188             handles.cond(i).rt_trial=[];
0189         end
0190     end
0191     set(handles.condtable,'visible','on');
0192     set(handles.condtable,'Data',dat);
0193     handles.trval=des.TR;
0194     set(handles.tredit,'String',num2str(des.TR));
0195     handles.unit=des.unit;
0196     if isfield(des,'covar') && ~isempty(des.covar)
0197         set(handles.covedit,'String',num2str((des.covar(:))',3));
0198         handles.covar=des.covar;
0199     else
0200         handles.covar=[];
0201         set(handles.covedit,'String','');
0202     end
0203 else
0204     dat={'cond1','0','0','[]'};
0205     set(handles.condtable,'visible','off');
0206     handles.trval=0;
0207     handles.covar=[];
0208     des.unit=1;
0209 end
0210 set(handles.condtable,'Data',dat);
0211 set(handles.condtable,'ColumnName',{'Name','Onsets','Duration','Regression targets (trials)'});
0212 set(handles.condtable,'ColumnEditable',[true,true,true,true]);
0213 set(handles.condtable,'ColumnWidth',{'auto',130,130,0});
0214 set(handles.condtable,'ColumnFormat',{'char','char','char','char'});
0215 set(handles.pop_unit,'String',{'Seconds','Scans'});
0216 if des.unit
0217     uv=1;
0218 else
0219     uv=2;
0220 end
0221 set(handles.pop_unit,'Value',uv)
0222 handles.unit=des.unit;
0223 
0224 def=prt_get_defaults('datad');
0225 if ~isempty(varargin) && length(varargin{2})>1
0226     PRT=varargin{2}{2};
0227     if isfield(PRT.group,'hrfdelay')
0228         handles.hrfdel=PRT.group(1).hrfdelay;
0229     else
0230         handles.hrfdel=def.hrfd;
0231     end
0232     if isfield(PRT.group,'hrfoverlap')
0233         handles.hrfover=PRT.group(1).hrfoverlap;
0234     else
0235         handles.hrfover=def.hrfw;
0236     end
0237 else
0238     handles.hrfdel=def.hrfd;
0239     handles.hrfover=def.hrfw;
0240 end
0241 end
0242 % Update handles structure
0243 guidata(hObject, handles);
0244 
0245 %UIWAIT makes prt_data_conditions wait for user response (see UIRESUME)
0246 uiwait(handles.figure1);
0247 
0248 
0249 % --- Outputs from this function are returned to the command line.
0250 function varargout = prt_data_conditions_OutputFcn(hObject, eventdata, handles) 
0251 % varargout  cell array for returning output args (see VARARGOUT);
0252 % hObject    handle to figure
0253 % eventdata  reserved - to be defined in a future version of MATLAB
0254 % handles    structure with handles and user data (see GUIDATA)
0255 
0256 % Get default command line output from handles structure
0257 if isfield(handles,'output') && ~isempty(handles.output)
0258     varargout{1} = handles.output;
0259 else
0260     varargout{1}=[];
0261 end
0262 
0263 % The figure can be deleted now
0264 if isfield(handles,'figure1')
0265     delete(handles.figure1);
0266 end
0267 
0268 
0269 % --- Executes on selection change in condmenu.
0270 function condmenu_Callback(hObject, eventdata, handles)
0271 % hObject    handle to condmenu (see GCBO)
0272 % eventdata  reserved - to be defined in a future version of MATLAB
0273 % handles    structure with handles and user data (see GUIDATA)
0274 
0275 % Hints: contents = get(hObject,'String') returns condmenu contents as cell array
0276 %        contents{get(hObject,'Value')} returns selected item from condmenu
0277 choice=get(handles.condmenu,'Value');
0278 if choice==1
0279     ncond=str2double(prt_text_input('Title','Enter number of conditions'));
0280     if isnan(ncond)
0281         return
0282     end
0283     dat=cell(ncond,4);
0284     for i=1:ncond
0285         dat{i,1}=['cond ',num2str(i)];
0286         dat{i,2}='NaN';
0287         dat{i,3}='NaN';
0288         dat{i,4}='[]';
0289     end
0290     set(handles.condtable,'visible','on');
0291     set(handles.condtable,'Data',dat);
0292 else
0293     des = spm_select(1,'.mat','Select multiple conditions file');
0294     try
0295         load(des);
0296     catch
0297         beep
0298         disp('Could not load file')
0299         return
0300     end
0301     try
0302         na=names;
0303     catch
0304         beep
0305         disp('No "names" found in the .mat file, please select another file')
0306         return
0307     end
0308     try
0309         dur=durations;
0310     catch
0311         beep
0312         disp('No "durations" found in the .mat file, please select another file')
0313         return
0314     end
0315     try
0316         ons=onsets;
0317     catch
0318         beep
0319         disp('No "onsets" found in the .mat file, please select another file')
0320         return
0321     end
0322 %     try
0323 %         rt=rt_trial;
0324 %     catch
0325 %         disp('No regression target (rt_trial) found in the .mat file')
0326 %         disp('Only classification techniques will be used')
0327 %     end
0328     szn=length(names);    
0329     dat=cell(szn,4);
0330     for i=1:szn
0331         try
0332             dat{i,1}=na{i};
0333         catch
0334             dat{i,1}=['cond ',num2str(i)];
0335         end
0336         handles.cond(i).cond_name=dat{i,1};
0337         try
0338             dat{i,3}=num2str(dur{i},3);
0339             handles.cond(i).durations=dur{i};
0340         catch
0341             dat{i,3}='NaN';
0342             handles.cond(i).durations=[];
0343         end
0344         try
0345             dat{i,2}=num2str(ons{i},3);
0346             handles.cond(i).onsets=ons{i};
0347         catch
0348             dat{i,2}='NaN';
0349             handles.cond(i).onsets=[];
0350         end
0351         try
0352             dat{i,4}=num2str(rt_trial{i},3);
0353             handles.cond(i).rt_trial=rt_trial{i};
0354         catch
0355             dat{i,4}='NaN';
0356             handles.cond(i).rt_trial=[];
0357         end
0358     end
0359     set(handles.condtable,'visible','on');
0360     set(handles.condtable,'Data',dat);
0361 end
0362 % Update handles structure
0363 guidata(hObject, handles);
0364 
0365 % --- Executes during object creation, after setting all properties.
0366 function condmenu_CreateFcn(hObject, eventdata, handles)
0367 % hObject    handle to condmenu (see GCBO)
0368 % eventdata  reserved - to be defined in a future version of MATLAB
0369 % handles    empty - handles not created until after all CreateFcns called
0370 
0371 % Hint: popupmenu controls usually have a white background on Windows.
0372 %       See ISPC and COMPUTER.
0373 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0374     set(hObject,'BackgroundColor','white');
0375 end
0376 
0377 
0378 
0379 function tredit_Callback(hObject, eventdata, handles)
0380 % hObject    handle to tredit (see GCBO)
0381 % eventdata  reserved - to be defined in a future version of MATLAB
0382 % handles    structure with handles and user data (see GUIDATA)
0383 
0384 % Hints: get(hObject,'String') returns contents of tredit as text
0385 %        str2double(get(hObject,'String')) returns contents of tredit as a double
0386 val=get(handles.tredit,'String');
0387 eval(['handles.trval=',val,';']);
0388 % Update handles structure
0389 guidata(hObject, handles);
0390 
0391 % --- Executes during object creation, after setting all properties.
0392 function tredit_CreateFcn(hObject, eventdata, handles)
0393 % hObject    handle to tredit (see GCBO)
0394 % eventdata  reserved - to be defined in a future version of MATLAB
0395 % handles    empty - handles not created until after all CreateFcns called
0396 
0397 % Hint: edit controls usually have a white background on Windows.
0398 %       See ISPC and COMPUTER.
0399 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0400     set(hObject,'BackgroundColor','white');
0401 end
0402 
0403 % --- Executes on selection change in pop_unit.
0404 function pop_unit_Callback(hObject, eventdata, handles)
0405 % hObject    handle to pop_unit (see GCBO)
0406 % eventdata  reserved - to be defined in a future version of MATLAB
0407 % handles    structure with handles and user data (see GUIDATA)
0408 
0409 % Hints: contents = get(hObject,'String') returns pop_unit contents as cell array
0410 %        contents{get(hObject,'Value')} returns selected item from pop_unit
0411 un=get(handles.pop_unit,'Value');
0412 if un==0
0413     set(handles.pop_unit,'Value',1)
0414     un=1;
0415 end
0416 if un==1
0417     handles.unit=1;
0418 else
0419     handles.unit=0;
0420 end
0421 % Update handles structure
0422 guidata(hObject, handles);
0423 
0424 % --- Executes during object creation, after setting all properties.
0425 function pop_unit_CreateFcn(hObject, eventdata, handles)
0426 % hObject    handle to pop_unit (see GCBO)
0427 % eventdata  reserved - to be defined in a future version of MATLAB
0428 % handles    empty - handles not created until after all CreateFcns called
0429 
0430 % Hint: popupmenu controls usually have a white background on Windows.
0431 %       See ISPC and COMPUTER.
0432 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0433     set(hObject,'BackgroundColor','white');
0434 end
0435 
0436 function covedit_Callback(hObject, eventdata, handles)
0437 % hObject    handle to covedit (see GCBO)
0438 % eventdata  reserved - to be defined in a future version of MATLAB
0439 % handles    structure with handles and user data (see GUIDATA)
0440 
0441 % Hints: get(hObject,'String') returns contents of covedit as text
0442 %        str2double(get(hObject,'String')) returns contents of covedit as a double
0443 dat=get(handles.covedit,'String');
0444 eval(['vect=[',dat,'];']);
0445 %second option of loading: enter the name of a .mat file containing a
0446 %'rt_subj' variable
0447 if isnan(vect)
0448     try
0449         load(char(vect));
0450     catch
0451         beep
0452         disp('Could not load file or read the covariate values')
0453         disp('Please enter either a .mat file name or enter the values')
0454         return
0455     end
0456     if ~exist('R','var')
0457         beep
0458         sprintf('Covariates file must contain ''R'' variable! ')
0459         disp('Please correct!')
0460         return
0461     else
0462         vect=R;
0463     end
0464 end
0465 handles.covar=vect;
0466 % Update handles structure
0467 guidata(hObject, handles);
0468 
0469 
0470 % --- Executes during object creation, after setting all properties.
0471 function covedit_CreateFcn(hObject, eventdata, handles)
0472 % hObject    handle to covedit (see GCBO)
0473 % eventdata  reserved - to be defined in a future version of MATLAB
0474 % handles    empty - handles not created until after all CreateFcns called
0475 
0476 % Hint: edit controls usually have a white background on Windows.
0477 %       See ISPC and COMPUTER.
0478 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0479     set(hObject,'BackgroundColor','white');
0480 end
0481 
0482 
0483 % --- Executes when entered data in editable cell(s) in condtable.
0484 function condtable_CellEditCallback(hObject, eventdata, handles)
0485 % hObject    handle to condtable (see GCBO)
0486 % eventdata  structure with the following fields (see UITABLE)
0487 %    Indices: row and column indices of the cell(s) edited
0488 %    PreviousData: previous data for the cell(s) edited
0489 %    EditData: string(s) entered by the user
0490 %    NewData: EditData or its converted form set on the Data property. Empty if Data was not changed
0491 %    Error: error string when failed to convert EditData to appropriate value for Data
0492 % handles    structure with handles and user data (see GUIDATA)
0493 
0494 ind=eventdata.Indices;
0495 if ind(2)>1
0496     dat=eventdata.EditData;
0497     eval(['vect=[',dat,'];']);
0498     % vect is a vector - need to compute a scalar to be able to use ||
0499     %if isnan(vect) || vect>10^6 || ~any(size(vect)==1)
0500     if any(isnan(vect)) || any(vect>10^6) || ~any(size(vect)==1)
0501         beep
0502         disp('Bad formatting of values found!')
0503         sprintf('Please review and correct condition %d, column %d', ind(1), ind(2))
0504         return
0505     end
0506 end
0507 if ind(2)==2  %check the unicity of the onsets
0508     vectb=unique(vect);
0509     if length(vect)~=length(vectb)
0510         beep
0511         disp('Duplicated values found in the onsets of condition %d', ind(1))
0512         disp('Please correct')
0513         return
0514     end
0515 end
0516 if ind(2)==1
0517     handles.cond(ind(1)).cond_name=eventdata.EditData;
0518 elseif ind(2)==2
0519     handles.cond(ind(1)).onsets=vect;
0520 elseif ind(2)==3
0521     handles.cond(ind(1)).durations=vect;
0522 elseif ind(2)==4
0523      % will never trigger for this version of ProNTo
0524     handles.cond(ind(1)).rt_trial=vect;
0525 end
0526 % TODO - version 2 will have support for rt_trial
0527 if ~isfield(handles.cond(ind(1)),'rt_trial')
0528     handles.cond(ind(1)).rt_trial=[];
0529 end
0530 % Update handles structure
0531 guidata(hObject, handles);
0532 
0533 
0534 % --- Executes on button press in okbutton.
0535 function okbutton_Callback(hObject, eventdata, handles)
0536 % hObject    handle to okbutton (see GCBO)
0537 % eventdata  reserved - to be defined in a future version of MATLAB
0538 % handles    structure with handles and user data (see GUIDATA)
0539 
0540 %check that the TR was entered
0541 if handles.trval==0
0542     beep
0543     disp('Enter TR value before continuing')
0544     return
0545 end
0546 
0547 
0548 %get number of conditions
0549 ncond=length(handles.cond);
0550 
0551 %check that for each condition, the size of the duration and onsets vectors
0552 %are the same
0553 for i=1:ncond
0554     szon=length(handles.cond(i).onsets);
0555     szdur=length(handles.cond(i).durations);
0556 %     szrt=length(handles.cond(i).rt_trial);
0557     if szdur==1
0558         handles.cond(i).durations=repmat(handles.cond(i).durations, 1, szon);
0559         szdur=length(handles.cond(i).durations);
0560     end
0561     if szdur ~=szon
0562         beep
0563         sprintf('The onsets and durations of condition %d do not have the same size', i)
0564         disp('Please correct')
0565         return
0566     end
0567 %     if szrt && szdur ~=szrt
0568 %         beep
0569 %         disp('The number of regression targets must be the number of trials!')
0570 %         sprintf('Please correct condition %d',i)
0571 %         return
0572 %     end
0573 end
0574 
0575 %Check that the conditions do not overlap, either directly or when taking
0576 %the width of the HRF into account
0577 conds=prt_check_design(handles.cond,handles.trval,handles.unit,...
0578     handles.hrfover,handles.hrfdel);
0579 conds.covar=handles.covar;
0580 handles.output=conds;
0581 
0582 % Update handles structure
0583 guidata(hObject, handles);
0584 
0585 uiresume(handles.figure1);
0586 
0587 % --- Executes on button press in cancelbutton.
0588 function cancelbutton_Callback(hObject, eventdata, handles)
0589 % hObject    handle to cancelbutton (see GCBO)
0590 % eventdata  reserved - to be defined in a future version of MATLAB
0591 % handles    structure with handles and user data (see GUIDATA)
0592 uiresume(handles.figure1);
0593

Generated on Mon 03-Sep-2012 18:07:18 by m2html © 2005