setting multiple fields at once / add new field to a cell struct
问题 I have a 1xn struct. The structs contains some fields with numeric cells. Not every struct has the same fields. So I would like to add the missing fields to the struct. But I didn't get it. % Mimimal example % I have same cells, imported from csv by csv2cell() clear dataCell{1}={"field_a","field_b","field_c"; ... 1,2,3; ... 4,5,6}; dataCell{2}={"field_a","field_b","field_d"; ... 1,2,4; ... 4,5,8}; % Then I convert them to a struct for ii=1:numel(dataCell) DataStruct{ii}=cell2struct((dataCell