help-octave
[Top][All Lists]
Advanced

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

size and display of N-d matrices (octave-3.4.2)


From: Sergei Steshenko
Subject: size and display of N-d matrices (octave-3.4.2)
Date: Wed, 10 Aug 2011 12:26:32 -0700 (PDT)

Hello,

here is a screen session:

"
octave:1> a(1,1,1,1) = 1
a =  1
octave:2> a(1,1,1,2) = 2
a =

ans(:,:,1,1) =  1
ans(:,:,1,2) =  2

octave:3> a
a =

ans(:,:,1,1) =  1
ans(:,:,1,2) =  2

octave:4> size(a)
ans =

   1   1   1   2

octave:5> b(1,1,1,1) = 3
b =  3
octave:6> b(2,1,1,1) = 4
b =

   3
   4

octave:7> b
b =

   3
   4

octave:8> size(b)
ans =

   2   1

octave:9>   
".

Questions:

1) why does 'octave' treat 'a' and 'b' differently ?
2) why 'b' is shown to have just two dimensions ?
3) why colons when 'a' is displayed ?

Thanks,
  Sergei.


reply via email to

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