Unverified Commit a019e87f authored by stephen scott tucker's avatar stephen scott tucker Committed by GitHub
Browse files

hmrR_GLM Fix: ensure lstML is always a column vector (#86)

- Convolution is truncated to tHRF

- Fix: lstML can be a vector or row for some reason

- Ensure that lstML is always a column vector
parent 6c68f5e1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -503,7 +503,7 @@ for iBlk=1:length(data_y)
            
            lstMLtmp = 1:size(ml,1);
            if mlSSlst(iSS)==0
                lstML = lstMLtmp(find(mlAct(lstMLtmp)==1));
                lstML = transpose(lstMLtmp(find(mlAct(lstMLtmp)==1)));
                % lstML = 1:size(y,3);
                At = A(:,:,conc);
            elseif flagNuisanceRMethod==0
@@ -533,7 +533,7 @@ for iBlk=1:length(data_y)
                end
                
            elseif flagNuisanceRMethod==2
                lstML = lstMLtmp(find(mlAct(lstMLtmp)==1));
                lstML = transpose(lstMLtmp(find(mlAct(lstMLtmp)==1)));
                % lstML = 1:size(y,3);
                Ass = mean(y(:,conc,lstSS),3);
                At = [A(:,:,conc) Ass];
@@ -547,7 +547,7 @@ for iBlk=1:length(data_y)
                
            elseif flagNuisanceRMethod==3
                if ischar(rcMap{iBlk}) % no channel map: use all tCCA regressors for one group of all channels
                    lstML = lstMLtmp(find(mlAct(lstMLtmp)==1));
                    lstML = transpose(lstMLtmp(find(mlAct(lstMLtmp)==1)));
                    At = [A(:,:,conc) Aaux];
                    
                    if iSS == 1 && conc == 1
@@ -558,7 +558,7 @@ for iBlk=1:length(data_y)
                    end
                    
                elseif iscell(rcMap{iBlk}) % channel map: each single regressor corresponds to one channel (nCH groups)
                    lstML = lstMLtmp(find(mlAct(rcMap{iBlk}{conc,iSS})==1));
                    lstML = transpose(lstMLtmp(find(mlAct(rcMap{iBlk}{conc,iSS})==1)));
                    Atcca = Aaux{iBlk}(:,rcMap{conc,iSS});
                    At = [A(:,:,conc) Atcca];