SimMechanics Does Not Support Run-Time Parameters
Model parameters are fixed during code generation. To change model parameters, edit the parameters in SimMechanics and regenerate code for the model. You can only change model parameters in SimMechanics itself.