As I said in my comments, it is very likely that splitting your matrix is going to make further processing more complicated, not easier. With that caveat:
[catnames, ~, subs] = unique(stimuli(:, 2));
splitresponses = accumarray(subs, (1:numel(subs))', [], @(cols) {responses(:, cols)});
splitresponses will be a cell array, where splitresponses{i} corresponds to all the responses for catnames{i}. Whatever you do, do not create individual variables for these.
If need be, you can convert the cell array into a structure whose fields are named after the stimuli:
responsesbystimuli = cell2struct(splitresponses, catnames)
but that again is likely to make your processing more complicated.
Best Answer