How do I update Simulink model-wide parameters from the command line?

L
Liana_s01 · Sep 18, 2020 · 2K views
Question
I would like to know if there is any way to access the Real-Time Workshop and Optimization parameters from the command line.
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 29, 2026

As of Simulink 5.1 (R13SP1), you can use the USET_PARAM and UGET_PARAM to change model-wide parameters. For example, to change the "RTW system target file" try:

uset_param(gcs,  'SystemTargetFile', new_target_file)

In Simulink 6.0 (R14), however, the utility functions UGET_PARAM and USET_PARAM are being obsoleted. For Simulink 6.0 (R14) and later releases, you should use GET_PARAM and SET_PARAM instead as explained in the following documentation:

web([docroot,'/toolbox/ecoder/ecoder_ug/f10575.html'])
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!