std::vector<std::vector<double>> mat1 = { { 1, 2, 3, 0.5}, {0.25, 1.5, 4, 0}, {7.5, 0.45, 5, 4.2} };
std::vector<std::vector<double>> mat2(mat1);
//or
std::copy(mat1.begin(), mat1.end(), std::back_inserter(mat2));
//or
mat2.assign(mat1.begin(), mat1.end());