In the case where the name might occur multiple times and you want to locate all of them, and you are only searching for one name:
idx = find(ismember({obj.characteristic4.name}, NameToSearchFor))
idx could be empty if the name is not found
In the case where the name occurs at most once or you only care about the first of them
[wasfound, idx] = ismember(NameToSearchFor, ismember({obj.characteristic4.name})
wasfound will be true if the name was found. idx will be the corresponding index in obj.characteristic4
In both cases you can extend NameToSearchFor to a cell array of character vectors of names to look for. With one order of the arguments to ismember, you are looking to see whether each name like 'Tim' matches somewhere in the characteristic4 list, and with the other order of arguments to ismember, you are looking to see whether the entries in the characteristic4 list match something in the list of names. Both have their uses.
Best Answer