Trying to use a for loop to add elements in a vec or a rowvec, but each time the loop adds an element, the matrix resets each time?
Noob in Armadillo, I've looked at the documentation but I can't even find a single sample example where they use for loops. Thanks for any help.
arma::vec A;
for (int i = 0; i < 10; i++) {
A << i;
}
cout << A;
Expected output : 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
Actual output : 9.0