# Find element in the table

I have a table

 {{0., 0., 0.}, {0.002, 0.08942, -0.08942}, {0.008,
0.233889, -0.178706}, {0.018, 0.366918, -0.267724}, {0.031,
0.496136, -0.350769}, {0.049, 0.639568, -0.439999}, {0.07,
0.779356, -0.5245}, {0.095, 0.922931, -0.609077}, {0.124,
1.06945, -0.693271}, {0.156, 1.21404, -0.77438}, {0.191,
1.35745, -0.852947}, {0.229, 1.50013, -0.929279}, {0.271,
1.64566, -1.00987}}


and I want to find the right element in the table. For example each row has three columns and I want to specify the value in the first column while the program should return the other two. Example: If I insert value 0.049 this is element {0.049, 0.639568, -0.439999} in the table and I want the computer to return me values 0.639568 and -0.439999.

Can this be done?

• Try Cases[data,{0.049,a__}]:>a]
– kale
Jul 13, 2015 at 13:55
• Works! Thank you! Jul 13, 2015 at 13:57
• Is it possible to extend this "Cases" to this: After he finds the element (in this case {0.049, 0.639568, -0.439999}) I want to get out let's say 0.639568 but I don't want to copy that number. Something like [[2]] but I don't know where to put it... ? Jul 13, 2015 at 14:06
• @kale or skrat, maybe you can answer the question now? Jul 13, 2015 at 14:07

FindCol[t_, n_, col_] := t[[Position [t, n][[1, 1]], col]]