I think if you want to select rows then the colon operator is in the wrong place, and that you would want something like
T1(strcmp(T1.TargetStatus, 'T') & strcmp(T1.Response, 'k'),:);
But it might really be more convenient to use categorical variables, like this
T1.Sequence = categorical(T1.Sequence)
T1.TargetStatus = categorical(T1.TargetStatus)
T1.Response = categorical(T1.Response)
T1(T1.TargetStatus=='N' & T1.Response=='k',:)
Since you are analyzing RT data, you might find the RawRT toolbox useful. It won't work with categorical variables, so you would have to convert everything to numbers, like this: T1.Sequence = grp2idx(T1.Sequence);
T1.TargetStatus = grp2idx(T1.TargetStatus);
T1.Response = grp2idx(T1.Response);
But then you could compute a lot of summary stats, graphs, ANOVAs, etc pretty simply, e.g.
somemeans = CondMeans(T1,'ReactionTime',{'TargetStatus','Response'})
somemeans =
TargetStatus Response ReactionTime
____________ ________ ____________
1 1 0.84507
2 2 0.89869
Best Answer