Simulink.BlockDiagram.saveActiveConfigSet

Package: Simulink.BlockDiagram

Save active configuration set of model

Syntax

Simulink.BlockDiagram.saveActiveConfigSet(model, filename)

Description

Simulink.BlockDiagram.saveActiveConfigSet(model, filename) saves the active configuration set of a model to a .m or .mat file. model is the name or handle of the model. filename is the name of the file to save the model configuration set. If you specify a .m extension, the file contains a function that creates a configuration set object. If you specify a .mat extension, the file contains a configuration set object. If you do not provide a file extension, the active configuration set is saved to a file with a .m extension. Do not specify filename to be the same as a model name; otherwise the software cannot determine which file contains the configuration set object when loading the file.

Examples

Save the configuration set from the sldemo_counters model to my_config_set.m.

% Open the sldemo_counters model
sldemo_counters
% Save the active configuration set to my_config_set.m
Simulink.BlockDiagram.saveActiveConfigSet('sldemo_counters', 'my_config_set.m')
Was this topic helpful?