IDX2order

PURPOSE ^

Converts class labels into an ordering.

SYNOPSIS ^

function order = IDX2order( IDX )

DESCRIPTION ^

 Converts class labels into an ordering.

 Creates an ordering order such that IDX(order)=[1 1...1 2...2 ... k...k].
 All points within a class retain the ordering in which they originally
 appeared.  Also, Xb = X(order,:) has cluster labels IDX(order), ie
 adjacent elements in X typically belong to the same cluster.

 USAGE
  order = IDX2order( IDX )

 INPUTS
  IDX     - cluster membership [see kmeans2.m]

 OUTPUTS
  order   - n-by-1 vector containing a new ordering for the points.

 EXAMPLE
  order = IDX2order( [1 1 3 1 2 2] )  % should be: [1 2 4 5 6 3]

 See also DISTMATRIXSHOW

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-Oct-2007 13:09:09 by m2html © 2003