Table Of Contents

Shift Array (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Shifts the elements in an array by a specified number of shifts.

    This node does not rotate the elements in the array. This node disposes of the elements of the input sequence shifted outside the range. You cannot recover those elements by shifting the array in the opposite direction.

    connector_pane_image
    datatype_icon

    reset

    A Boolean that specifies whether to reset the internal state of the node.

    True Resets the internal state of the node.
    False Does not reset the internal state of the node.

    This input is available only if you wire a double-precision, floating-point number to input array.

    Default: False

    datatype_icon

    input array

    Input array to shift.

    This input changes to input data point when the data type is a double-precision, floating-point number.

    datatype_icon

    input data point

    Input data point to shift.

    This input changes to input array when the data type is a 1D array of double-precision, floating-point numbers.

    datatype_icon

    number of shifts

    Direction and number of shifts to apply to the input array. This node shifts the input array to the right if number of shifts is positive and to the left if number of shifts is negative.

    The absolute value of number of shifts must be less than the number of elements in input array. If the absolute value of number of shifts is greater than or equal to the number of elements in input array, this node sets shifted array to 0 and returns an error.

    Default: 0

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    shifted array

    Output sequence.

    This output changes to shifted data point when the input data type is a double-precision, floating-point number.

    datatype_icon

    shifted data point

    Output sequence.

    This output changes to shifted array when the input data type is a 1D array of double-precision, floating-point numbers.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Algorithm for Shifting Arrays

    Let the sequence Y represent the output sequence shifted array. Then the elements of Y are related to the elements of X by the following equation:

    Y i = { X i shifts if 0 i shifts < n 0 elsewhere

    for i = 0, 1, ..., n - 1,

    where n is the number of elements in input array.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics