Dataset updateset

From Eigenvector Research Documentation Wiki
Revision as of 10:43, 12 September 2012 by imported>Scott
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

Add/update a label field (axisscale,label,class) in a DataSet.

Synopsis

[dso,useset] = updateset(dso,'field',mode,value) %new unnamed class
[dso,useset] = updateset(dso,'class',mode,class,classlookup) %new unnamed class
[dso,useset] = updateset(dso,'field',mode,value,name) %update/add
[dso,useset] = updateset(dso,'class',mode,class,name,classlookup) %update/add with class looup

Description

Locates a class, axisscale, or label set, as indicated in the "field" input, with the matching name (if name is supplied) and updates it with the value. If no name is supplied or no matching name is found in the DataSet, the new values are added as a new set. Also assigns fieldname and lookup table (if supplied for classes) to the set.

If "name" is omitted, the values will always be added into the first empty set or onto the end of all sets (if no empty sets found). If "name" is supplied, any set with the corresponding field name (classname, axisscalename, labelname) will be overwritten with the value or a new set will be created to hold the values.

Outputs are the modified DataSet (dso) and the set that was modified or added (useset).

See Also

subsasgn