It is worth noting that concatenating matrices like this makes a copy, and thus is not a good idea for large amounts of data, or in performance sensitive inner loops. If you are concatenating vectors to a matrix many times in a loop, using an Array-of-Arrays is sometimes a better option.