mimics gauss function sortc
[matout]=sortc(matin,val)
* matin = input (nxp) matrix
* val = value to fill the holes
* matout = (nxp) transformed matrix
A=[1 3 2 4; 5 1 0 2 ; 4 2 1 2];B=sortc(A,3) // returns // B = //! 5. 1. 0. 2. ! //! 4. 2. 1. 2. ! //! 1. 3. 2. 4. !