Main Content

Truncate Data Vector Using Offset Block

Use the Offset block to remove or keep the samples in a data vector.

The Mode parameter in the block determines the operation to perform.

  • Remove beginning samples: Discard the initial values of a vector.

  • Remove ending samples: Discard the final values of a vector.

  • Keep beginning samples: Retain the initial values of a vector.

  • Keep ending samples: Retain the final values of a vector.

The number of samples to remove or keep is determined by the offset value that is input through the O port. The length of the output truncated vector is determined by the Output length parameter.

Open and run the offset_model.slx model. The model shows how the block modifies the data in all the four modes of operation. The truncated vectors are displayed by the Display block.

See Also

Blocks