I want to order a series of data , the amount of data is from 1 to n.
I build a matrix size data*data. In each matrix cell, there is the connection between the data in col and rows IJ.
For example in 21, there is the connection between data(2) compared to data(1).
If the number is negative it means that the data(2) is supposed to be before data(1)
A is the matrix of the data:
[ 0 -20449 0 ; 19689 0 -18705 ; 0 17667 0 ]
At first I recognize that the number in A(1,2) is negative,
So that means that my series now is changed from
1-2-3 to 2-1-3.
And so on, unfortunaley I can’t come up with a code that don’t mess this series.
Notice the final result should be 3-2-1