Dataset search: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
No edit summary
imported>Scott
 
Line 6: Line 6:
Return 'out' as index of matches. Searches are case insensitive (use "" for case sensitive).
Return 'out' as index of matches. Searches are case insensitive (use "" for case sensitive).


NOTE: If field is numeric then 'searchterm' will be interpreted as numeric expression. First characters can be relational operators.
NOTE: If field is numeric then 'searchterm' will be interpreted as numeric expression. First characters can be relational operators. Examples can be seen [http://wiki.eigenvector.com/index.php?title=PlotControlsWindow_Layout_2#Search_Bar here].


Search Criteria (TEXT):
Search Criteria (TEXT):

Latest revision as of 21:54, 5 March 2014

Purpose

Search for given term in a dso field, mode, and set.

Synopsis

out = search(dso_in,fieldname,fieldmode,fieldset,searchterm)

Description

Return 'out' as index of matches. Searches are case insensitive (use "" for case sensitive).

NOTE: If field is numeric then 'searchterm' will be interpreted as numeric expression. First characters can be relational operators. Examples can be seen here.

Search Criteria (TEXT):

* = wildcard (similar to SQL wildcard, not strict RE)
"" = exact match.
re: = regular expression.
si: = sample index.

Examples

load arch

arch.label{2}
ans =
Fe
Ti
Ba
Ca
K
Mn
Rb
Sr
Y
Zr

ca_idx = search(arch,'label',2,1,'ca')
ca_idx =
     0
     0
     0
     1
     0
     0
     0
     0
     0
     0

See Also

dataset_sortby, dataset_sortcols, dataset_sortrows