Two steps:
(1) Add
'SaveState','on'
To the input parameters of "sim" such that the states of the system will be logged.
simout(i) = sim(mdl,'SimulationMode','rapid',...
'RapidAcceleratorUpToDateCheck','off', ...
'RapidAcceleratorParameterSets',paramSet(i), ...
'SaveState','on');
(2) Access the saved states of the i-th simulation by
simout(i).get('xout')