Usage notes and limitations:
The code generator does not treat a dictionary as a constant, even if the
dictionary is constant at code generation time. This means that the
numEntries
function does not return a constant. You cannot pass
the output of the numEntries
function to a function that requires
constant inputs. You cannot use the output of the numEntries
function for operations that require constants, such as indexing into a heterogeneous
cell array. The code generator also cannot perform optimizations that depend on
constants, such as constant folding, on the output of the
numEntries
function.
For additional considerations that apply when generating C/C++ code for
MATLAB® dictionaries, see Dictionary Limitations for Code Generation (MATLAB Coder).