MATLAB: Acces workspace of model using sim command in parfor loop

assigninparforsetparamsimsimulink

I want to acces the workspace of a model I'm running with the sim comment. I want to set a parameter with assigning or setparam. How can I refer to that workspace? (this should all be performed insite a parfor loop that executes the external model several times with this parameter changing every time the loop is executed)

Best Answer

assignin('base', 'var',value)