In R2013a, when you do union(,[1 2]) , MATLAB returns a column vector, i.e. [1;2], as opposed to the row vector [1 2] that it returned in prior versions. It is given in the documentation that the index vectors returned by union will now always be column vectors. However, that row vector will now be transposed whenever unioned with a null vector seems like it couldn't possible have a purpose, and at the least should be documented if it was intentional.
No products are associated with this question.
You will find
The behavior of union has changed. This includes: - occurrence of indices in IA and IB switched from last to first - orientation of vector C - IA and IB will always be column index vectors - tighter restrictions on combinations of classes
So the change in orientation of the union output is documented.
Play games and win prizes!Learn more