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 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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)