MATLAB: To Workspace block not returning results when simulating using SimulationInput objects

baseblockobjectsimulationinputsimulinksimulink.simulationinputtoworkspace

Why are To Workspace blocks not creating variables with the assigned names in the Base Workspace when I run my model using a 'SimulationInput' object?

Best Answer

When running a model using
out = sim(in)
where 'in' is a 'SimulationInput' object, a To Workspace block does not give the assigned variable name, e.g. 'simout', in the Base Workspace. Instead, the To Workspace block variable 'simout' is given as part of the 'SimulationOutput' object generated by 'sim', i.e. in this case 'out.simout'.