getRefConfigSet
Get configuration set from configuration reference
Description
Examples
Get Configuration Set from Configuration Reference
Create a ConfigSetRef
object that references a
freestanding configuration set, then get the ConfigSet
handle
representing that configuration set. Change model parameter values through this
handle.
Open the model vdp
. Create a freestanding configuration set by
copying the configuration set of the model.
openExample('simulink_general/VanDerPolOscillatorExample'); model = 'vdp'; freeConfigSet = copy(getActiveConfigSet(model));
Create a configuration reference, and point the reference to your freestanding configuration.
configRef = Simulink.ConfigSetRef; set_param(configRef,SourceName='freeConfigSet'); set_param(configRef,Name='vdpConfigRef');
Attach the configuration reference to the vdp
model and activate
it.
attachConfigSet('vdp',configRef); setActiveConfigSet('vdp','vdpConfigRef');
Get the freestanding configuration set referenced by configRef
and assign it to a new ConfigSet
handle.
referencedConfig = getRefConfigSet(configRef);
Use the new ConfigSet
handle to modify parameter values in the
referenced configuration set.
set_param(referencedConfig,SignalLogging='off'); set_param(referencedConfig,StartTime='10');
Input Arguments
configRef
— Configuration reference
Simulink.ConfigSetRef
object
Configuration reference, specified as a Simulink.ConfigSetRef
object.
Output Arguments
configObj
— Configuration object
Simulink.ConfigSet
object |
Simulink.ConfigSetRef
object
Configuration object, returned as a Simulink.ConfigSet
object or a Simulink.ConfigSetRef
object.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)