M = table2uint32(table) M = table2uint32(table, flds) [M1,M2] = table2uint32(table1,flds1, table2,flds2)
Replace table cells with numeric values.
| table1 | any | structure of equal height arrays (table) +----fld1(N,:) +----fld2(N,:) |
| flds1 | any | [cell array of chars] fields to sort on (optional) (default:
fieldnames(table))
table2,flds2: optional second pair of table/fieldnames
|
M(N,P):
[uint32] P=length(flds1). Matrix with rank indices
[1.7;8;-1;8] will be replaced with [2,3,1,3]. In other words: sort
will be supplied.
If you need different behavior, for example output [ 1 2 3 2], use
table2ID
REVISIONS:
20200611 checked for use with R2016b strings.