checkDynamicFields

Reports use of any dynamic struct field names and property names. Aside from personal preferences regarding this construct, this check is especially useful when the code must be MATLAB Coder-compatible (generating C/C++ code from your MATLAB code). This is because dynamic struct field and property names are not supported by the MATLAB Coder. Some examples of what will be reported by this check are (where the variable and name can be a struct and fieldname, or an object and property name):

s.(theField)     = 12;
s.x.(otherField) = 10;
a                = s.(b + "cd");
c                = s.(['test', 'cat'])

Exemption tag: %@ok<DYNFI>