help > RE: data mean adjustment
May 10, 2016  09:05 AM | Gina Joue
RE: data mean adjustment
Hiya,

Here is a sample SPM.mat for one subject and the commands:

xlvl = {'conCinsTrem0' 'conCinsTrem1' 'conCinsDrem0' 'conCinsDrem1' 'conIinsTrem0' 'conIinsTrem1' 'conIinsDrem0' 'conIinsDrem1'};

for i=1:length(xlvl)
xlvlPPI{i} = sprintf('PPI_%s',xlvl{i});
end

load('SPM.mat');

for c=1:length(xlvl)
   cinds = find(~cellfun(@isempty, regexp(SPM.xX.name,sprintf(' %s',xlvl{c})))); % need to add space or will also match PPI_
   pinds = find(~cellfun(@isempty, regexp(SPM.xX.name,xlvlPPI{c})));
   for i=1:length(cinds)
      figure(s*100+c*10+i)
      plot(SPM.xX.X(1:178,cinds(i)))
      hold on
      plot(SPM.xX.X(1:178,pinds(i)),'r')
      title(['sub' subj '\color{blue}' SPM.xX.name(cinds(i)) ' - ' '\color{red}' SPM.xX.name(pinds(i))])
   end
end

Thank you, Donald!!

Gina
Attachment: SPM.mat

Threaded View

TitleAuthorDate
Gina Joue May 9, 2016
Donald McLaren May 10, 2016
RE: data mean adjustment
Gina Joue May 10, 2016
Donald McLaren May 11, 2016
Gina Joue May 27, 2016
Donald McLaren May 27, 2016