Dynamic parameterization of Armadillo matrix dimensions in C++
问题 The title summarizes the goal that is more exactly to dynamically retrieve the number of dimensions of MATLAB arrays passed to armadillo matrices. I would like to change the second and third arguments of mY() and mD() to parametric ones below. // mat(ptr_aux_mem, n_rows, n_cols, copy_aux_mem = true, strict = false) arma::mat mY(&dY[0], 2, 168, false); arma::mat mD(&dD[0], 2, 168, false); This must be definitely a common use case, but I still could not find a nice way of achieving it for the