Dataset sortby
Jump to navigation
Jump to search
PURPOSE
Sort a DataSet by given field, dim, and set.
Synopsis
- [B,index] = sortby(A,field,dim,set,direction)
Description
Allows sorting of a DataSet on any field associated with the data.
Inputs
- field = name of the field to sort.
- 'axisscale'
- 'class'
- 'classid'
- 'label'
- dim = dimension (mode) of field to use.
- set = set (column) to use.
- direction = direction to sort, 'ascend' or 'descend'.
Examples
[B,index] = sortby(A,'labels',1,2,'descend')