On Mon, 10 Oct 2016, Allin Cottrell wrote:
If I understand you correctly, the following
script should provide a template. [...]
Ah, it struck me you may have something a bit different in mind.
Here's another interpretation: from a raw data matrix with 4 columns
in fixed positions, produce a matrix which shows the rank order of
the data values on each row.
<hansl>
# Example 2
scalar T = 100
matrix M = mnormal(T,4)
matrix Mr = zeros(T,4)
colnames(Mr, "A B C D")
loop i=1..T -q
Mr[i,] = ranking(M[i,])
endloop
print Mr
</hansl>
Allin Cottrell