MATLAB: To convert a variable (struct with fields of numeric matrix) to a sliced variable (an array of struct)

MATLABsliced variable

I was doing code refactor to apply parfor to some legacy code. Legacy code creates a big struct variable called 'Boot', with fields of numeric matrix.
I want to convert it to a new sliced variable "BootS" , but if I do the conversion like the attached image, Matlab give me warnings that I should preallocate it.
( iters means number of iterations.)
warnings.png
I tried to preallocate BootS as the code commented out , it fails with runtime errors.
Anyone has good idea to convert it elegantly??

Best Answer

closed
see answer above