MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Is there any efficient easy way to compare two lists with the same length with Mathematica?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124377] Re: Is there any efficient easy way to compare two lists with the same length with Mathematica?
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Tue, 17 Jan 2012 06:01:22 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

And@@Thread[A > B]

Bobby

On Tue, 17 Jan 2012 02:34:35 -0600, Rex <aoirex at gmail.com> wrote:

> Given two lists `A={a1,a2,a3,...an}` and `B={b1,b2,b3,...bn}`, I would
> say `A>=B` if and only if all `ai>=bi`.
>
> There is a built-in logical comparison of two lists, `A==B`, but no
> `A>B`.
> Do we need to compare each element like this
>
> And@@Table[A[[i]]>=B[[i]],{i,n}]
>
> Any better tricks to do this?
>


-- 
DrMajorBob at yahoo.com



  • Prev by Date: Re: How to remove the Null character in a Table?
  • Next by Date: Re: Extract a part of expression
  • Previous by thread: Is there any efficient easy way to compare two lists with the same length with Mathematica?
  • Next by thread: Re: Is there any efficient easy way to compare two lists with the same length with Mathematica?