Matlab: extract length of field data in structure with arrayfun

arrayfun(@(x) size(s(x).f,1), 1:numel(s))
% https://www.mathworks.com/matlabcentral/answers/113592-extract-length-of-data-in-a-structure#answer_122225 <2020-10-10>