[Top][All Lists]

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

[Octave-bug-tracker] [bug #53690] incorrect test in delaunayn?

From: Rik
Subject: [Octave-bug-tracker] [bug #53690] incorrect test in delaunayn?
Date: Wed, 18 Apr 2018 13:42:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #53690 (project octave):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 
                 Release:                  4.3.90 => dev                    


Follow-up Comment #1:

This is okay.  See the documentation for the if statement in the Octave

The condition in an if statement is considered true if its value is nonzero,
and false if
its value is zero. If the value of the conditional expression in an if
statement is a vector or
a matrix, it is considered true only if it is non-empty and all of the
elements are nonzero.
The conceptually equivalent code when condition is a matrix is shown below.
if (matrix) ≡ if (all (matrix(:)))

And as an example,

if ([1 0 1])
  disp ("1 0 1 is true");
  disp ("1 0 1 is false");
1 0 1 is false


if ([1 1 1])
  disp ("1 1 1 is true");
  disp ("1 1 1 is false");
1 1 1 is true


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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