I'm trying to use Eigen3 to generate a 2d float matrix (num_samples, num_ranges) such that each column is a continuously spaced range from [0, num_samples) like [0, 1, 2 ... num_samples - 1].
I'm currently achieving this by creating a similar 2d std::vector with std::iota and then converting that to an Eigen 2d matrix.
Is there a faster and simpler way to do this in Eigen?
Aucun commentaire:
Enregistrer un commentaire