Some additional comments which haven’t been covered already. For what it’s worth I have in the past used Matlab extensively, although I switched away many years ago.
You can concatenate an empty matrix if the other dimensions match, e.g. [zeros(0, 5); zeros(4, 5)]
. But when it comes to the general pattern of repeatedly concatenating to a matrix, that is a pattern which is frequently used in Matlab in lack of better options. Chances are that you will find functions like push!
, append!
, and reduce
to provide satisfactory alternatives.
That is something of an oddball syntax in Matlab, which is different from any other programming language I’ve used and one I’ve never understood the attraction of. Naturally tastes vary but I’m confident that this is never going to be considered based on PSA: Julia is not at that stage of development anymore.