addBlock
Add block to list of tuned blocks for slTuner interface
Syntax
Description
addBlock( adds
the block referenced by st,blk)blk to the list of tuned blocks of the slTuner interface, st.
Examples
Open the Simulink® model.
mdl = 'scdcascade';
open_system(mdl)

Create an slTuner interface for the Simulink model, and add a block to the list of tuned blocks of the interface.
st = slTuner(mdl,'C1'); addBlock(st,'C2');
Input Arguments
Interface for tuning control systems modeled in Simulink,
specified as an slTuner interface.
Block to add to the list of tuned blocks for st,
specified as:
Character vector or string — Block path. You can specify the full block path or a partial path. The partial path must match the end of the full block path and unambiguously identify the block to add. For example, you can refer to a block by its name, provided the block name appears only once in the Simulink model.
For example,
blk = 'scdcascade/C1'.Cell array of character vectors or string array — Multiple block paths.
For example,
blk = {'scdcascade/C1','scdcascade/C2'}.
More About
Tuned blocks, used by
the slTuner interface, identify blocks in a Simulink model
whose parameters are to be tuned to satisfy tuning goals. You can
tune most Simulink blocks that represent linear elements such
as gains, transfer functions, or state-space models. (For the complete
list of blocks that support tuning, see How Tuned Simulink Blocks Are Parameterized).
You can also tune more complex blocks such as SubSystem or S-Function
blocks by specifying an equivalent tunable
linear model.
Use tuning commands such as systune to
tune the parameters of tuned blocks.
You must specify tuned blocks (for example, C1 and C2)
when you create an slTuner interface.
st = slTuner('scdcascade',{'C1','C2'})
You can modify the list of tuned blocks using addBlock and removeBlock.
To interact with the tuned blocks use:
getBlockParam,getBlockValue, andgetTunedValueto access the tuned block parameterizations and their current values.setBlockParam,setBlockValue, andsetTunedValueto modify the tuned block parameterizations and their values.writeBlockValueto update the blocks in a Simulink model with the current values of the tuned block parameterizations.
Version History
Introduced in R2014a
See Also
slTuner | removeBlock | addPoint | addOpening
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)