%% PreSimFcn for sldemo_parsim_paramsweep_suspn_raccel

% Copyright 2017 The MathWorks, Inc.

function in = sldemo_parsim_paramsweep_suspn_raccel_presim(in, Mb)
    global DEFAULT_RTP;
    % Modify the parameter value
    parameterSet = Simulink.BlockDiagram.modifyTunableParameters(DEFAULT_RTP, 'Mb', Mb);
    
    % Set the model parameter on the SimulationInput object and return the
    % modified SimulationInput object to be used for simulation
    in = in.setModelParameter('RapidAcceleratorParameterSets', parameterSet);
end