qc_set_config_string qc_set_config_variable navigation bar

Table of Contents

qc_get_config_variable

Gets the value of a configuration-set variable.

Syntax

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

Description

Gets the value of 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 to retrieve, as a string.

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

value

The value of the configuration-set variable as a string.

Examples

ip_address = qc_get_config_variable('host');
    

See Also

 

navigation bar