Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Extracting data from 1 table with {x,y} in anot...' topicStudent Support Forum > General > Archives > "Extracting data from 1 table with {x,y} in anot..."

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
07/28/12 2:47pm

Will this do?

In[1]:= data={{2,4,0,45},
{3,2,1,98},
{1,2,0,52},
{3,4,2,75}};
query={{1,4},{1,4},{2,4},{2,4},{2,4},{2,4},{4,4}};
output=Map[data[[Sequence@@#]]&,query]

Out[3]= {45,45,98,98,98,98,75}

URL: ,

Subject (listing for 'Extracting data from 1 table with {x,y} in anot...')
Author Date Posted
Extracting data from 1 table with {x,y} in anot... Adam Kustka 07/27/12 10:27am
Re: Extracting data from 1 table with {x,y} in ... Forum Modera... 07/28/12 2:29pm
Re: Extracting data from 1 table with {x,y} in ... Bill Simpson 07/28/12 2:47pm
< Previous CommentHelp | Reply To Comment | Reply To Topic