| Real-Time Workshop | ![]() |
Parameter Tuning via MATLAB Commands
The Model Parameter Configuration dialog is the recommended way to see or set the attributes of tunable parameters. However, you can also use MATLAB get_param and set_param commands.
The following commands return the tunable parameters and/or their attributes:
get_param(gcs, 'TunableVars')
get_param(gcs, 'TunableVarsStorageClass')
get_param(gcs, 'TunableVarsTypeQualifier')
The following commands declare tunable parameters or set their attributes:
The following example declares the variable k1 to be tunable, with storage class ExportedGlobal and type qualifier const.
set_param(gcs, 'TunableVars', 'k1')
set_param(gcs, 'ExportedGlobal')
set_param(gcs, 'TunableVarsTypeQualifier','const')
| Target Language Compiler API for Parameter Tuning and Signal Monitoring | Simulink Data Objects and Code Generation | ![]() |