inp = '003';
% S group
subS = {'001','002','003'};
aS = {'R','O','O'};
% T group
subT = {'01','02','03'};
aT = {'O','O','R'};
[X,Y] = ismember(inp,subS);
aS(Y(X))
[X,Y] = ismember(inp,subT);
aT(Y(X))
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!