"Bruno Luong" <email@example.com> wrote in message <firstname.lastname@example.org>... > "Matt J" wrote in message <email@example.com>... > > > > > 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.