Matlab, known matrix A = [5 7 8 4; 2 1 4 9; 1 3 6 2], B = sort (a, 2), how to find the element of a in B position, thanks

Matlab, known matrix A = [5 7 8 4; 2 1 4 9; 1 3 6 2], B = sort (a, 2), how to find the element of a in B position, thanks


[b,ind] = sort(a,2);
,ind_ ind] = sort(ind,2);
ind_ IND is it



Matlab matrix calculation problem,
A is a matrix of M rows and N columns, in which the elements of the M rows and N columns are pi * (m-n), that is, a (1,1) = pi * (1-1), a (1,2) = pi * (1-2), a (1,3) = pi * (1-3). How to calculate a new matrix from the expression sin (5 * (pi * (m-n))) / sin (pi * (m-n))? How to write the program?


That's good
sin(5*A)./sin(A)