MATLAB: Structure find numbers associated with strings

structures

Best Answer

It's a bit awkward, but yes ...
idxNY = arrayfun(@(k)isequal(person(k).hometown,'New York'),1:numel(person))
[person(idxNY).height]'
I find it typically easier to use the table obect to store this type of data.