If I have a matrix like:
A=[ 8 3 67 8 2 0 0 0 0 0; 8 76 9 233 1 89 34 0 0 0; 98 23 87 9 3 24 64 45 1 0]
and I use the sort (A, 2) command, it will be sorted next to the columns, but at the same time shift the zeros forward. I would like to leave 0 to the end for computational purposes later in the code.
I was looking for a team that does this because I feel that it is. I also tried sorting, flipping and wrapping to get what I want, but Im at a dead end.
source share