I have a row by col matrix called “stock” and I have a col array called “flow”. I want to add the content of flow to the bottom of stock. I thought the following would work, but it does not:
stock = [stock;flow[1,:]]
My background is MATLAB, so I thought I could fix the issue using
The mistake is mine. I will request to delete the question and post it with better information. It turns out I am not working wit a matrix but a 18×12 Array{Any,2}…
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.