Julia’s broadcasting mechanism generally rejects incompatible dimensions (in contrast to, say, R’s “recycling”). See, in particular, ?broadcast, which tells you that
Singleton and missing dimensions are expanded to match the extents of the other arguments by virtually repeating the value.
From a user perspective just that it worked. I tried to follow the function call, but the way broadcasting is implemented is way too complicated for me.
I don’t disagree with your issue, but to nitpick: Julia would normally call x a two-dimensional array 3×1 Array{Float64,2}, where one of the dimensions is 1, to be distinguished from one-dimensional Vector. Of course, Matlab treats them as the same, but Julia doesn’t. Not sure what they should be called here, maybe 1-column matrix?