No, I don’t want to suggest any really big changes, not now.
It would make more sense to me if ; produced an nx1 matrix instead of a vector. So the simple rule becomes: commas do vectors, semicolons and spaces concatenate and produce matrices.
That would entail the following changes.
-
vcatproducesnx1matrices. -
hcatproduces1xnmatrices -
hvcatproducesmxnmatrices - a new function
cattakes vectors and returns a vector
The idea is that hcat and vcat, with their direction explicitly included, only make sense in a 2D context, and it helps separate vectors and 1xn/nx1 matrices more meaningfully. The convenient [v;w] becomes cat(v,w) or cat([v,w]).
To me that’s cleaner, but maybe other beginners would be confused by distinguishing vectors/1xn,nx1 matrices this way. Would be interested to get other people’s ideas.