Dataset search: Difference between revisions
Jump to navigation
Jump to search
imported>Scott |
imported>Scott |
||
(One intermediate revision by the same user not shown) | |||
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): | ||
Line 14: | Line 14: | ||
: re: = regular expression. | : re: = regular expression. | ||
: si: = sample index. | : si: = sample index. | ||
===Examples=== | |||
<pre>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 | |||
</pre> | |||
===See Also=== | ===See Also=== | ||
[[dataset_sortby]], [[dataset_sortcols]], [[dataset_sortrows]] | [[dataset_sortby]], [[dataset_sortcols]], [[dataset_sortrows]] |
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