How can I use a parfor loop in matlab for a simulink simulation using structs?
25 views (last 30 days)
I have a simulink model with different outputs (to workspace - matrix) and one input x (factor) that I want to run in a parfor loop. The simulation takes hours so I wanted to use parallel computing, storing the results in structs (or what else would be possible?). I always get the message 'syntax error' - (its working as a normal for loop) who can show me the problem? thanks! marcus
matlabpool open 8
parfor counter= 1:10
x = factor(counter);
counter.(['Durchlauf_' num2str(counter)]).Voltage= simout_NVP_Voltage;
counter.(['Durchlauf_' num2str(counter)]).Current= simout_NVP_Current;