help-octave
[Top][All Lists]
Advanced

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

Re: size of empty matrix


From: Dmitri A. Sergatskov
Subject: Re: size of empty matrix
Date: Sat, 16 Jun 2018 20:24:16 -0500


On Sat, Jun 16, 2018 at 8:07 PM, Dmitri A. Sergatskov <address@hidden> wrote:
Could somebody explain it to my why I get different answers calling
size(b) and "size b" when b is an empty matrix?



octave:60> b=[]
b = [](0x0)
octave:61> size(b)
ans =

   0   0

octave:62> size b
ans =

   1   1


Dmitri.

​Same with length(), any() ...

​octave:71> b=[]
b = [](0x0)
octave:72> length b
ans =  1
octave:73> length(b)
ans = 0
octave:74> any b
ans = 1
octave:75> any(b)
ans = 0

Dmitri.
--



reply via email to

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