Polybench® for biosignals / reference 1.34.1
This block is used to set (a) specified field(s) to one!

Set Field Number

Overview

This operator transforms a field number to a vector with a 1 value in the specified field.

There are two inputs. The first is an any input. The output vector of this block will get the same length as the vector at this input. The second input is the field number input. This input specifies which field from the output vector should be one.

There is a property and variable parameter Length. This parameter specifies if and how many fields after the indicated field should also have the value 1.

The first field in a vector has field number 0, the second 1, etc.

Operator ports

Input V_Any: Specific sample type, see below.

Input S_Field Number: Floating point values

Output V_Mask_array: Floating point value buffers

Properties

Find more information about changing properties here: "Properties Viewer"

Length
type: See description
Amount of fields after the specified field that will also be 1. Note: Only positive integer values are accepted!


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: "Variable Parameters"

Length
type: See description
Amount of fields after the specified field that will also be 1. Note: Only positive integer values are accepted!

Details

Examples

Example: Get Field Number Example
This operator allowes the user to get a specific field number. This number is indicated by the first field in the input vector that contains the value of 1 or higher. The output is a streaming number, with the same sample frequency as the input vector
Examples\DF0507011_001_Get_Field_Number_Exmp.xmc