Main Content

createDWorkArg

Class: RTW.TflBlockEntry
Namespace: RTW

Create DWork argument for a block replacement entry

Since R2024a

Syntax

arg = createDWorkArg(blockEntry,type,Name1=Value1,...,NameN=ValueN)

Description

arg = createDWorkArg(blockEntry,type,Name1=Value1,...,NameN=ValueN) creates a handle for a DWork argument that you can add to a block replacement entry.

Input Arguments

expand all

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

Example: RTW.TflBlockEntry

Data type of the DWork argument, specified as a character vector or string scalar. You can specify one of the supported type strings or a string that creates a data type, such has fixdt(true,16,0) or int32.

Example: Pointer

Example: fixdt(true,16,0)

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: 'Name'='crlDWorkArg'

Argument name for the DWork, specified as a character vector or string scalar.

Example: CRLDWork

Structure type information, specified as a structure with these elements:

  • Identifier - string name of the structure

  • Elements - array of elements in the structure. Each element is a structure with the elements Type and Identifier.

For example, this code creates the structure type information in the structure ssTypeP.

se1.Identifier = 'Coeffs';
se1.Type = 'single*';

se2.Identifier = 'InitStates';
se2.Type = 'single';

se3.Identifier = 'CoeffsSize';
se3.Type = 'uint16';

ssTypeP.Identifier = 'InitStruct';
ssTypeP.Elements = [se1, se2, se3];

Data type of the argument, specified as a character vector or string scalar. You can specify built-in MATLAB data types such as uint8, boolean, double, and others.

Example: 'Type','uint8'

Base data type of a matrix, pointer, or complex DWork, specified as a character vector or string scalar.

Example: single

Output Arguments

expand all

Specifying the return argument in the createDWorkArg function call is optional.

Version History

Introduced in R2024a