cns_groupno

Finds group numbers in a model structure by group name.

Syntax

Finding a Single Group Number

g = cns_groupno(m, name)
g = cns_groupno(m, name, err)
m
A model structure.

name
A group name. Can also be a group number, in which case it will just be validated.

err
Affects what happens if the group name cannot be found in m. If true, will halt with an error. If false, will cause g to return 0. Defaults to true.

g
The group number if found. If not found, and err is false, will return 0.

Finding All Group Numbers

s = cns_groupno(m)
m
A model structure.

s
Returns a structure with one field per group name, where the value of each such field is the group number.