Why do you need so strange "loop"? Why not just write

for(i=0;i<pdf_vector.size ();i++)
{
all_vector.push_back (dft_output_vector.at <double>(i, 0));
}