void Trajectory::set_misc(const Eigen::MatrixXd& misc) { if (misc.rows()==ts_.size()) { // misc is of size n_time_steps X n_dims_misc misc_ = misc; } else if (misc.rows()==1) { // misc is of size 1 X n_dim_misc // then replicate it so that it becomes of size n_time_steps X n_dims_misc misc_ = misc.replicate(ts_.size(),1); } else { cerr << __FILE__ << ":" << __LINE__ << ":"; cerr << "misc must have 1 or " << ts_.size() << " rows, but it has " << misc.rows() << endl; } }