Hello,
I’m trying to refresh an old code of mine, about 5 years old. I found this function:
## sort array M with respect to colon j
function sortbycol(M,j)
local col, perm
col = M[:,j]
perm = sortperm(col)[2]
return(M[perm,:])
end
I don’t remember why I used local
. Is it a good practice? Or is it useless? Or what?