MATLAB: How to find which group of array belong to a certain position in a string

arraycell arrayMATLABstrings

Let's say I have 30 string. First I want to divide it into 5 string in each group. Second I want to find which group contain string between position ex, 11 to 23 from the original string? How do I do that?
aaSeq = 'MQRSPLEKASVFSKLFFSWTRPILRKGYRQ'; %my string
a = cellstr(reshape(aaSeq,5,[])')' %I divide into 5 string in each group

Best Answer

>> seq = 'MQRSPLEKASVFSKLFFSWTRPILRKGYRQ';
>> mat = reshape(aaSeq,5,[]).'
mat =
MQRSP
LEKAS
VFSKL
FFSWT
RPILR
KGYRQ
>> idx = reshape(1:numel(seq),5,[]).'
idx =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
26 27 28 29 30
>> [grp,~] = find(any(idx>=11&idx<=23,2))
grp =
3
4
5