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

Function Documentation

MatXd lupnt::Subsample(const MatX &x, int step_row, int step_col)

Subsample a matrix.

Take every step_row-th row and step_col-th column of matrix x.

Used alongside the vector overload to thin a dense state-history matrix (rows = time samples, columns = state components) before plotting.

Parameters:
  • x – Input matrix

  • step_row – Step size for rows

  • step_col – Step size for columns

  • x – Input matrix

  • step_row – Row stride

  • step_col – Column stride

Returns:

Subsampled matrix

Returns:

Subsampled matrix of size (x.rows()/step_row) x (x.cols()/step_col)