cns_getconsts

Retrieves the values of compile-time constants that apply at the scope of a model, layer, or group (based on the package and cell type).

Syntax

[v, v, ...] = cns_getconsts(m, n, name, name, ...)
s = cns_getconsts(m, n)
s = cns_getconsts(m, n, nameList)
m
A model structure.

n
  • A positive number indicates a layer.
  • A negative number indicates a group.
  • Zero indicates model scope.
  • name
    The name of a constant (at the scope defined by n) whose value you want to retrieve.

    v
    The value of the corresponding constant.

    nameList
    A cell array of constant names (at the scope defined by n) whose values you want to retrieve. Defaults to all valid constants.

    s
    A structure with one field per name in nameList (or all valid constants if nameList is not provided), where the value of each such field is the value of the corresponding constant.