2011-11-06

Assigning a column vector to a row of a matrix in Octave/MATLAB

I just feel this is somehow unsafe.

octave:34> A=[1 2;3 4]
A =

   1   2
   3   4

octave:35> A(1,:) = [5; 6]
A =

   5   6
   3   4

octave:36>  [5; 6]
ans =

   5
   6

No comments: