RTW.BlockProperty
Description
creates a block property that has the specified property name and value. Adding the property
to an prop
= RTW.BlockProperty(Name
,Value
)RTW.TflBlockEntry
object specifies the property setting for the entry to match during code replacement.
Examples
Replace Code from Direct Form Filter Blocks
This example shows how to create a block replacement entry that replaces code from Discrete FIR Filter blocks that use the direct form filter structure.
Create a block replacement entry for the Discrete FIR Filter block.
entry = RTW.TflBlockEntry;
entry.Key = 'DiscreteFir';
Create a block property that specifies the property
FilterStructure
and the value Direct
form
.
prop = RTW.BlockProperty('FilterStructure', 'Direct form');
Add the block property to the block replacement entry.
addBlockProperty(entry,prop);
When you use the block replacement entry in a code replacement table, the entry
matches Discrete FIR Filter blocks that have
FilterStructure
set to Direct form
.
Input Arguments
Name
— Block property name
string
Name of the block property to match during code replacement, specified as a string.
The property can be a dialog property or an algorithm property of the block. To find the
available dialog properties of a block, click the block in the model and enter
get_param(gcb, 'DialogParameters')
at the command line. To find the
available algorithm properties of a block, click the block in the model and enter
get_param(gcb, 'AlgorithmParameters')
at the command line.
Example: 'FilterStructure'
Data Types: string
Value
— Property value to match
string
Property value to match during code replacement, specified as a string. To find the
value of a property for a block, click the block in the model and enter
get_param(gcb, PropertyName)
at the command
line.
Example: 'Direct form'
Data Types: string
Output Arguments
prop
— Handle to the created block property
handle
Handle to the created block property. Add the block property to a block replacement
entry by specifying the handle as an input to the addBlockProperty
method.
Version History
Introduced in R2024a
See Also
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes 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)