I have a structure in MATLAB with over one hundred data entries per field.
struct.p = [1 2 3 4 ...]
I want to be able to search for a field by typing in a data entry.
For example, typing 2
will tell me that the field is 'p'
.
I've tried combining isfield
and find
which hasn't worked.
find(isfield(p(9)))