I have a function which runs a parfor loop. Within the loop, I call another function which generates a structure as a result. I need to store all the structures.
parfor i = 1:num_sim
name = sprintf('result_%i',i)
total_results.(name) = struct_result
This gives me an error message:
The variable total_results in a parfor cannot be classified.
How can I store the structure "struct_result" from all the simulations? It is a nested structure.