Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
sci.math.*
»
sci.math.symbolic
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
Is there any efficient easy way to compare two lists with the same length with Mathematica?
Replies:
0



Rex
Posts:
23
Registered:
10/13/10


Is there any efficient easy way to compare two lists with the same length with Mathematica?
Posted:
Jan 16, 2012 3:00 PM


Given two lists with same length, `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 builtin comparison of two lists, `A==B` and `AB`, 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?



