Function lupnt::Subsample(const VecX&, int)

Function Documentation

VecXd lupnt::Subsample(const VecX &x, int step)

Subsample a vector.

Take every step-th element of vector x.

Used by plotting/post-processing code (e.g. ex_imu_dynamics.cc, ex_ekf_2d.cc) to thin a dense time-history vector before plotting.

Parameters:
  • x – Input vector

  • step – Step size

  • x – Input vector

  • step – Stride (every step-th element is kept)

Returns:

Subsampled vector

Returns:

Subsampled vector of size x.size() / step