Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7939 > unrolled thread

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

Started byRex <aoirex@gmail.com>
First post2012-01-17 08:52 +0000
Last post2012-01-17 08:52 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Is there any efficient easy way to compare two lists with the same length with Mathematica? Rex <aoirex@gmail.com> - 2012-01-17 08:52 +0000

#7939 — Is there any efficient easy way to compare two lists with the same length with Mathematica?

FromRex <aoirex@gmail.com>
Date2012-01-17 08:52 +0000
SubjectIs there any efficient easy way to compare two lists with the same length with Mathematica?
Message-ID<jf3csl$nr4$1@smc.vnet.net>
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?

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web