qc_get_config_strings qc_get_config_variable navigation bar

Table of Contents

qc_set_config_string

Stores a value in a string based on a configuration set.

Syntax

new_string = qc_set_config_string(string, value)             % stores a value associated with the active configuration set in the given string
new_string = qc_set_config_string(string, value, model)      % stores a value associated with the active configuration set for the specified model in the given string
new_string = qc_set_config_string(string, value, config_set) % stores a value associated with the specified configuration set in the given string
    

Description

Stores a value in a string representation. The value is associated with the current or given configuration set in the string. Hence, the string representation may contain multiple values, with one value for each configuration set referenced.

This function treats normal simulation mode as a separate configuration. If only two arguments are provided then the active configuration set is only used if the model is in external mode. To explicitly specify the normal simulation configuration, specify 'normal' as the config_set argument.

This function is useful for creating block parameters that are dependent on the current configuration.

Parameters

string

A string containing the current configuration-dependent values. The output string is derived from this string.

value

A string containing the value to store in the string of configuration-dependent values.

model

A string indicating the name of the model whose simulation mode and active configuration set are used to determine the configuration under which to store the value in the given string.

config_set

A Simulink.ConfigSet configuration set (see

getConfigSet

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

doc('getConfigSet')
)

Outputs

This function has no outputs.

Examples

new_string = qc_set_config_string(string, 'comm_test_model', 'tcpip://localhost:18000');
    

See Also

 

navigation bar