[Top][All Lists]

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

Re: Comparison of vectors

From: Francesco Potorti`
Subject: Re: Comparison of vectors
Date: Wed, 11 Nov 1998 18:00:21 +0100 (CET)

Daniel Tourde <address@hidden> wrote:
   I would like to compare two vectors and to get 1 if and only if all
   their components are the same. How can I do ?

In the Finding Elements and Checking Conditions node of the Octave manual
you read:

     all (all (rand (5) < 0.9))
          => 0

tests a random 5 by 5 matrix to see if all of it's elements are less
than 0.9.                                     ^^^^
             (by the way, this is a typo)--/

In your case, you just do 

   if all(A==B) ...

reply via email to

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