Concatenating matrices in a loop slows down with loop iterations.
For example this pseudocode:
OutputM = [];
for( i=1, i<=N, i++,
// do some calculations, generate a matrix of results, call it, ThisM
OutputM |/ = ThisM
);
If I do the above, then as N increases, the VConcat line gets slower and slower with every iteration.
Note that each iteration produces a matrix with same number of columns, but variable number of rows.
It's much faster to do this :
OutputList = {}; // will be a list of matrices
for( i=1, i<=N, i++,
// do some calculations, generate a matrix of results, call it, ThisM
insertinto(OutputList, ThisM)
);
Now we want to concat together the list of matrices we've generated.
The question is how ?
//This doesn't work:
VConcat(OutputMList);
// Neither does this :
VConat(Eval List(OutputMList);
// Nor this:
VConcat(Eval list(Eval(OutputMList);
// I know I can concat multiple matrices, for example this works:
VConat(OutputMList[1],OutputMList[2], OutputMList[3]);
// But the desire is to generalize this