By default, the Y criterion is TPR computed for all possible score thresholds. The score thresholds are distinct values in the 2nd input to perfcurve - they do not depend on the negative class. TPR at a fixed threshold depends only on the scores for the positive class. That's why you get two identical columns in suby. If you want to compute two ROC curves at once, swap the X and Y criteria:
s = rand(30,1);
Y = datasample(1:3,30)';
[x,y,t,auc,optrocpt,suby,subynames] = perfcurve(Y,s,2,'negClass',[1 3],...
'ycrit','fpr','xcrit','tpr');
plot(suby(:,1),x)
hold
plot(suby(:,2),x,'r')
hold off
title('Two ROC curves')