"Bruno Luong" <firstname.lastname@example.org> wrote in message <email@example.com>... > "Matt J" wrote in message <firstname.lastname@example.org>... > > > > > If so, why doesn't this apply to both examples? The LHS is the same in these examples. > > Not sure I understand, A(1,:) = ... is not the same as A(:,1) = ....
OK. Well then a 3rd example
If I'm not mistaken, this will be equivalent to
z=C(:,1); %memory allocation
All subsref operations, AFAIK, result in freshly allocated memory, even though it's not necessary here.