Engee documentation

Pad

Addition or truncation of the specified dimension or dimensions.

blockType: Pad

Path in the library:

/Signal Operations/Signal Operations/Pad

Description

Block Pad complements the sequence with the same samples of a given value, or truncates it to a given length by columns, rows, columns, and rows, or by any other dimensions you specify.

The block truncates the input signal when you specify output dimensions that are smaller than the corresponding input dimensions. If the dimensions of the input and output data are the same, the block acts as a pass-through.

The value of the augmented counts can be entered in the parameter Pad value the block or via the input port. You can enter an output dimension in the block parameter or tell the block to increase the specified dimension until its length is equal to the next power of two.

Parameter Pad signal at controls whether the block will complement or truncate the dimension of the input signal at the beginning, at the end, or in both places. For odd values of the complement or truncation dimension, an additional dimension value is used at the end of the signal. When the unit is in operation mode Specified dimensions you can specify either the output size or the pad size.

You can configure the block to issue an error when the input signal is truncated using the parameter Action when truncation occurs.

Ports

Output

# OUT_1 — augmented or truncated output signal
scalar | vector | the matrix | multidimensional array

Details

Augmented or truncated output signal. The size and dimension of the output data depend on whether the input signal has been augmented or truncated according to a given dimension. The type and complexity of the output data correspond to the input.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

Input

# IN_1 — Input signal
scalar | vector | the matrix | multidimensional array

Details

An input signal specified as a scalar, vector, matrix, or multidimensional array.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

# PVal — value for the supplement
scalar

Details

A constant value specified in the form of a scalar, which will be added to the Input.

Dependencies

To use this port, set the parameter Pad value source value Input port.

Data types

Float64

Complex numbers support

I don’t

Parameters

Main

# Pad over — the type of dimension that will be used for addition or truncation
Columns | Rows | Columns and rows | None | Specified dimensions

Details

The type of dimension that will be used for addition or truncation:

  • Columns — columns;

  • Rows — lines;

  • Columns and rows — columns and rows;

  • None "No," I said.;

  • Specified dimensions — specified by the user as a scalar for the number of columns, a two—element vector for the number of columns and rows, and -an element vector is the number of elements of a multidimensional array.

Values

Columns | Rows | Columns and rows | None | Specified dimensions

Default value

Columns

Program usage name

PadOver

Tunable

No

Evaluatable

No

# Dimensions to pad — the dimension by which the addition or truncation will be performed
Int64 integer

Details

Specify the dimension(s) by which the addition or truncation should be performed. The value of this parameter can be a scalar or a vector.:

  • 1 — add columns;

  • (1 2) — add columns and rows;

  • (1 3 5) — complete the first, third and fifth dimensions.

Dependencies

To use this parameter, set for the parameter Pad over meaning Specified dimensions.

Default value

1

Program usage name

DimensionsToPad

Tunable

No

Evaluatable

Yes

# Pad value source — the source of the complement value
Specify via dialog | Input port

Details

Sources of value for the supplement:

  • Specify via dialog — the value is entered in the parameter field Pad value;

  • Input port — the value is sent to the PVal port.

Values

Specify via dialog | Input port

Default value

Specify via dialog

Program usage name

PadValueSource

Tunable

No

Evaluatable

No

# Pad value — value for the supplement
Real or complex number

Details

Specify a constant scalar value that will be added to the input.

Dependencies

To use this parameter, set for the parameter Pad value source meaning Specify via dialog.

Default value

0

Program usage name

PadValue

Tunable

No

Evaluatable

Yes

# Output column mode — output column length setting mode
User-specified | Next power of two

Details

Ways to generate the column length at the output:

  • User-specified — specified by the user;

  • Next power of two — is defined as the nearest power of two. The block complements the output columns until their length becomes the next largest power of two. If the column length is already a power of two, the block will not complement the columns.

Dependencies

To use this parameter, set for the parameter Pad over meaning Columns or Columns and rows.

Values

User-specified | Next power of two

Default value

User-specified

Program usage name

OutputColumnMode

Tunable

No

Evaluatable

No

# Column size — the length of the column in the output
Int64 integer

Details

Specify the length of the output column. If the specified column length is greater than the length of the input column, the block complements the columns. If the specified column length is less than the length of the input column, the block truncates the columns.

Dependencies

To use this parameter, set for the parameter Output column mode meaning User-specified.

Default value

1

Program usage name

ColumnSize

Tunable

No

Evaluatable

Yes

# Output row mode — output string length setting mode
User-specified | Next power of two

Details

Ways to generate the length of the output string:

  • User-specified — specified by the user;

  • Next power of two — is defined as the nearest power of two. The block complements the output lines until their length becomes the next largest power of two. If the length of the string is already a power of two, the block will not complement the strings.

Dependencies

To use this parameter, set for the parameter Pad over meaning Rows or Columns and rows.

Values

User-specified | Next power of two

Default value

User-specified

Program usage name

OutputRowMode

Tunable

No

Evaluatable

No

# Row size — the length of the output string
Int64 integer

Details

Specify the length of the output string. If the specified line length is longer than the input line length, the block complements the lines. If the specified string length is less than the input string length, the block truncates the strings.

Dependencies

To use this parameter, set for the parameter Output row mode meaning User-specified.

Default value

1

Program usage name

RowSize

Tunable

No

Evaluatable

Yes

# Specify — determine the length of the sequence
Output size | Pad size

Details

Generates the length of the output sequence by:

  • Output size — her direct instructions;

  • Pad size — specifying the complement lengths at the beginning and at the end of the sequence.

Dependencies

To use this parameter, set for the parameter Pad over meaning Specified dimensions.

Values

Output size | Pad size

Default value

Output size

Program usage name

Specify

Tunable

No

Evaluatable

No

# Output size mode — output sequence length indication mode
User-specified | Next power of two

Details

Ways to generate the length of the sequence at the output:

  • User-specified — specified by the user;

  • Next power of two — is defined as the nearest power of two. The block complements the specified dimensions until their length becomes the next largest power of two. If the length of the dimension is already a power of two, the block will not complement these dimensions.

Dependencies

To use this parameter, set for the parameter Pad over meaning Specified dimensions and for the parameter Specify meaning Output size.

Values

User-specified | Next power of two

Default value

User-specified

Program usage name

OutputSizeMode

Tunable

No

Evaluatable

No

# Output size — the length of the output sequence
Int64 integer

Details

Specify the output length according to the specified dimension(s).

This parameter must be a scalar or a vector with the same number of elements as the parameter. Dimensions to pad.

Each element of the vector Output size gives the output length for the corresponding dimension in the vector Dimensions to pad.

If the specified length is greater than the input length for this dimension, then the block complements this dimension. If the specified length is less than the input length for a given dimension, then the block complements this dimension.

Dependencies

To use this parameter, set for the parameter Pad over meaning Specified dimensions, for the parameter Specify meaning Output size, and for the parameter Dimensions to pad a scalar value.

Default value

1

Program usage name

OutputSize

Tunable

No

Evaluatable

Yes

# Pad size at beginning — the number of values to add to the beginning of the input signal
Int64 integer

Details

Specify how many values should be added to the beginning of the input signal according to the specified dimensions. This parameter must be a scalar or a vector with the same number of elements as the parameter. Dimensions to pad. Each element of the parameter Pad size at beginning gives a value to add at the beginning of the corresponding dimension in the parameter Dimensions to pad. The values of this parameter must be non-negative integers.

Dependencies

To use this parameter, set for the parameter Pad over meaning Specified dimensions, for the parameter Specify meaning Pad size, and for the parameter Dimensions to pad a scalar value.

Default value

0

Program usage name

PadSizeAtBeginning

Tunable

No

Evaluatable

Yes

# Pad size at end — the number of values to add to the end of the input signal
Int64 integer

Details

Specify how many values should be added to the end of the input signal according to the specified dimensions. This parameter must be a scalar or a vector with the same number of elements as the parameter. Dimensions to pad. Each element of the parameter Pad size at beginning gives a value to add at the end of the corresponding dimension in the parameter Dimensions to pad. The values of this parameter must be non-negative integers.

Dependencies

To use this parameter, set for the parameter Pad over meaning Specified dimensions, for the parameter Specify meaning Pad size, and for the parameter Dimensions to pad a scalar value.

Default value

0

Program usage name

PadSizeAtEnd

Tunable

No

Evaluatable

Yes

# Pad signal at — where should I insert or truncate the signal?
End | Beginning | Beginning and end

Details

Options for adding sequence counts:

  • End — at the end;

  • Beginning — at the beginning;

  • Beginning and end — at the beginning and at the end. In this case, half of the complement length is added to the beginning of the signal, and the other half is added to its end. If the padding length is odd, an additional value is added to the end of the signal. When setting the signal truncation in this mode, an equal number of values are truncated from the beginning and end of the signal. In the case of an odd truncation length, the extra value is removed from the end of the signal.

Dependencies

To use this parameter, set for the parameter Pad over meaning Columns, Rows or Columns and rows.

Values

End | Beginning | Beginning and end

Default value

End

Program usage name

PadSignalAt

Tunable

No

Evaluatable

No

# Action when truncation occurs — action when a truncation occurs
None | Warning | Error

Details

Messages when the sequence is truncated:

  • None — not issued;

  • Warning — a warning is issued;

  • Error — an error message is displayed.

Dependencies

To use this parameter, set for the parameter Pad over meaning Columns, Rows or Columns and rows.

Values

None | Warning | Error

Default value

None

Program usage name

ActionWhenTruncationOccurs

Tunable

No

Evaluatable

No