Sort matrix based on the elements of a specific column

A = rand(1:100, 3, 4)   # a random matrix
A[sortperm(A[:, 4]), :] # sorted by the 4th column

Welcome to Julia!

15 Likes