Ranking Values in the Wilcoxon Signed Rank Test

Someone may be able to spot something that we’re both missing, but in the meantime you can achieve what you want by running two sorts - so

sort(sort([1...5],L),L)

should do the trick.