Start of trail qc_get_config_strings navigation bar

Table of Contents

qc_get_config_string

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

Syntax

value = qc_get_config_string(string)             % retrieves a value associated with the active configuration set in the given string
value = qc_get_config_string(string, model)      % retrieves a value associated with the active configuration set of the specified model in the given string
value = qc_get_config_string(string, config_set) % retrieves a value associated with the specified configuration set in the given string
    

Description

Retrieves a value from 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 one argument is 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. If no value is stored for the given configuration set then an empty string is returned.

Parameters

string

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

model

A string indicating the name of the model whose simulation mode and active configuration set are used to determine which configuration-dependent value to extract from 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

value

The configuration-dependent value extracted from the string. The value itself is a string.

Examples

uri = qc_get_config_string(string, 'comm_test_model');
    

See Also

 

navigation bar