The usual way to do it is something like this.
v = [];
for ii = 1:3
v = [v ii:4];
end
v % Show v
Note that it is usually better to avoid growing an array in a loop if possible. But one would have to see the code to know if it should be avoided.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!