select_taxon

selects a taxon from list

Contents

created 2016/02/25 by Bas Kooijman, modified 2018/06/14

Syntax

[taxon, s, v] = select_taxon (list, level)

Description

select a taxon from a list of all possibilities

Input:

  0 all taxa, including leaves
  1 all taxa, excluding leaves
  2 leaves (names with "_")
  3 genera only (names before first "_")
  4 families only (names ending on "idae")
  5 orders only (match with allStat.mat)
  6 classes only (match with allStat.mat, but does not work for Reptilia)
  7 phyla only (match with allStat.mat)

Output:

Remarks

taxon and s are empty, and v = 0, if cancel has been selected. taxon is 'Animalia', and v = 1, if no selection has been made and OK is selected

Example of use

select_taxon                         % for all taxa, including leaves
select_taxon('',4)                   % for family names only
select_taxon(list_taxa('Insecta',3)) % for insect genera