# "Select" from List A Given Criteria on List B

**URL:** <https://community.wolfram.com/t/select-from-list-a-given-criteria-on-list-b/14014>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [May 1, 2019, 1:11am UTC](https://community.wolfram.com/t/select-from-list-a-given-criteria-on-list-b/14014 "2019-05-01T01:11:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lubrs](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lubrs/32/23871_2.png) [@lubrs](https://community.wolfram.com/u/lubrs)\
**Post date:** [May 1, 2019, 1:11am UTC](https://community.wolfram.com/t/select-from-list-a-given-criteria-on-list-b/14014/1 "2019-05-01T01:11:01Z")

</div>

A trivial example:  
Given:  
A = {1,2,3,4};  
B={97,-44,18,-1}  
How is Select used to do something like:  
Select[A,B\>0]

---

<div class="post-metadata">

**Author:** ![dreiss1](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/dreiss1/32/6907_2.png) [@dreiss1](https://community.wolfram.com/u/dreiss1)\
**Post date:** [May 1, 2019, 1:22am UTC](https://community.wolfram.com/t/select-from-list-a-given-criteria-on-list-b/14014/2 "2019-05-01T01:22:23Z")

</div>

> **[Pick: Select elements of list based on mask—Wolfram Documentation](https://reference.wolfram.com/language/ref/Pick.html)**
>
> Pick\[list, sel\] picks out those elements of list for which the corresponding element of sel is True. Pick\[list, sel, patt\] picks out those elements of list for which the corresponding element of sel matches patt.

For your example you might do

```
Pick[A, MapThread[Greater, {A, B}]]

```

---

<div class="post-metadata">

**Author:** ![lubrs](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lubrs/32/23871_2.png) [@lubrs](https://community.wolfram.com/u/lubrs)\
**Post date:** [May 1, 2019, 3:03am UTC](https://community.wolfram.com/t/select-from-list-a-given-criteria-on-list-b/14014/3 "2019-05-01T03:03:58Z")

</div>

Thank you!
