Grocer Function

NAME

sortc - mimics gauss function sortc

CALLING SEQUENCE

[matout]=sortc(matin,val)

PARAMETERS

Input

Output

DESCRIPTION

Function that mimics gauss function sortc: sorts a matrix according to the value of one of its columns

EXAMPLE

A=[1 3 2 4; 5 1 0 2 ; 4 2 1 2];B=sortc(A,3)

Example gives the matrix:
 B  =
!   5.    1.    0.    2. !
!   4.    2.    1.    2. !
!   1.    3.    2.    4. !

AUTHOR

Eric Dubois 2004