MATLAB: Get result from uitable’s row number

uitable

I have uitable below and i wanna get results uitable's row number not matrix's row number.
f = figure('Position',[10 10 600 600]);
dat = {-1,1,1;0,-1,0;0,0,-1;1,0,0};
cnames = {'12','23','25'};
rnames = {'11','12','23','14'};
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,...
'RowName',rnames,'Position',[10 10 590 590]);
blnA = logical( A == -1 );
blnOut = find(any(A == -1,2));
max(blnOut)
ans =
3
My expected result is 23 not 3. How can i get that value?

Best Answer

rnames are not a row number: rnames are row labels. You find the row number (a numeric value) but somehow you expect a string that is the row label to be returned by max() . max() never returns strings.
rnames{blnOut}
will give you the row label associated with the row #blnOut