# MATLAB: Concatenating vectors generated with loop

MATLABmatrix

I would like to run a for loop like
   for i=1:N          output=[1 i]          output2 = [output2 output]    end
But in this example it seems that I need to define output2 at the beginning. Is there any compact way to write this operation?

output2 = [];