| Author |
Comment/Response |
Leo Ditolaghi
|
10/05/10 00:23am
Hi all, noob Mathematica question:
If I have two lists, how do I determine at which indices does the 1st list match the elements of the second, and then use these matching indices to extract corresponding columns in the 1st list (sort of a simulated database join)? I.e.,
x = {{"hello", 27},
{"bye", 30},
{"hello", 54},
{"seeya", 100},
{"hi", 9}}
y = {"hello", "hi"}
I wish to produce z, where y defines which elements of x to extract:
z = {27,54,9}
Thanks in advance,
Leo
URL: , |
|