qc_get_config_variable qc_get_model_arguments navigation bar

Table of Contents

qc_set_config_variable

Creates or updates a configuration-set variable.

Syntax

old_value = qc_set_config_variable(name, value)             % set the variable in the active configuration set for the current model
old_value = qc_set_config_variable(model, name, value)      % set the variable in the active configuration set for the given model
old_value = qc_set_config_variable(config_set, name, value) % set the variable in the given configuration set
    

Description

Creates or updates a configuration-set variable. Configuration-set variables are like model workspace variables except that they are stored in a configuration set. Hence, activating a different configuration will change the value of the variable.

Configuration-set variables are useful for assigning different values to a set of model parameters based on the currently active target.

Parameters

name

The name of the configuration-set variable, as a string.

value

A string containing the value to assign to the configuration-set variable.

model

A string indicating the name of the model whose active configuration set is used.

config_set

A Simulink.ConfigSet configuration set (see getConfigSet)

Outputs

old_value

The value previously assigned to the configuration-set variable.

Examples

qc_set_config_variable('host', '192.168.0.44');
    

See Also

 

navigation bar