Preallocate structure of cells in matlab
问题 I use a structure called test with the following "layout" (result of whos test, test ) Name Size Bytes Class Attributes test 1x1 8449048 struct test = timestamp: {[7.3525e+05] [7.3525e+05] [7.3525e+05]} timeseries: {[44000x8 double] [44000x8 double] [44000x8 double]} For speed issues, I want to preallocate that with zeros. I found some ways, which result in other "layouts": test2=struct('timestamp',cell(1,3),'timeseries',cell(1,3)); test3=struct('timestamp',{0,0,0},'timeseries',{zeros(44000,8