Main Content


Class: RTW.TflBlockEntry
Namespace: RTW

Add block property to a block replacement entry

Since R2024a




RTW.TflBlockEntry.addBlockProperty(blockEntry,blockProperty) adds the block property to the block replacement entry object. The entry replaces only blocks that use the specified value for the block property.

Input Arguments

expand all

Block entry object, specified as an RTW.TflBlockEntry object.

Example: RTW.TflBlockEntry

Block property, specified as a block property handle created by the RTW.BlockProperty function. During code replacement, the block entry matches blocks that use the property settings specified by the block properties that you add to the entry.

Example: RTW.BlockProperty('FilterStructure', 'Discrete')


expand all

Create a block entry for the Discrete FIR Filter block that matches blocks that use the Direct form filter structure and frame-based input processing.

entry = RTW.TflBlockEntry;
entry.Key = 'DiscreteFir';

prop1 = RTW.BlockProperty('FilterStructure', 'Direct form');
addBlockProperty(entry, prop1);
prop2 = RTW.BlockProperty('InputProcessing', 'Columns as channels (frame based)'); 
addBlockProperty(entry, prop2);

During code replacement, the entry for the Discrete FIR Filter block matches blocks that have FilterStructure set to Direct form and InputProcessing set to Columns as channels (frame based).

Version History

Introduced in R2024a