<< shiftr Basic functions spencer >>

Grocer >> Basic functions > sortc

sortc

mimics gauss function sortc

CALLING SEQUENCE

[matout]=sortc(matin,val)

PARAMETERS

Input

* matin = input (nxp) matrix

* val = value to fill the holes

 

Output

* matout = (nxp) transformed matrix

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)
// returns
// B  =
//!   5.    1.    0.    2. !
//!   4.    2.    1.    2. !
//!   1.    3.    2.    4. !

AUTHOR

Eric Dubois 2004

Report an issue
<< shiftr Basic functions spencer >>