Attach a component to a configuration set



attachComponent(cs,component) attaches a component to a Simulink.ConfigSet object.


collapse all

Replace the solver component of the active configuration set of one model with the solver component of another model.

Get the active configuration set for modelB.

hCs = getActiveConfigSet('modelB');

Get the 'Solver' component for this configuration set.

hSolverConfig = getComponent(hCs,'Solver');

Create a copy of the component.

hSolverConfig = copy(hSolverConfig);

Get the active configuration set for modelA.

hCs = getActiveConfigSet('modelA');

Attach the copy of the 'Solver' component from modelB to modelA.


Input Arguments

collapse all

A configuration set object that you can attach a component to.

A component that you can attach to configuration set.

Introduced before R2006a