currently I'm using:

i = mapslices(sortperm, m, 1);
offset=repmat( (0:(c-1))'.*r ,r, 1);
v = m[offset+i];

Reply via email to