help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

initializing matrix not from the first row


From: Sergei Steshenko
Subject: initializing matrix not from the first row
Date: Fri, 29 Jun 2012 07:58:05 -0700 (PDT)

Hello,

in octave-3.6.2 I see this:

"
octave:1> foo(2, :) = [1 2 3]
foo =

   0   0   0
   1   2   3

octave:2> 
".

I have no problem with the fact that the matrix has two rows - since I've
initialized row #2, row #1 is somehow created.

My question is: why row #1 is all zeros ? And not NaNs ? Compatibility with
Matlab ?

Thanks,
  Sergei.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]