Suppose I have a cell array containing structs, each with 3 fields.
When I encounter a new struct, I would like to check whether the values in 2 of its 3 fields match those of any struct elements in the array.
cell_array = cell(4,1)
cell_array{1}.Field1 = "ABC"
cell_array{1}.Field2 = 46
cell_array{1}.Field3 = 1648
% Would like to check if fields 1 and 2 match
% any struct in cell_array
new_struct.Field1 = "ABC"
new_struct.Field2 = 46
new_struct.field3 = 1765
Thank you.
s(1).Field1. This is more memory-efficient, less error prone, and quite a bit easier to work with.