Hi. I need a help
I have defined the matrix "m" and the position ( variable index1) of the line in the first column.
How do I extract the element defined by the position calculated and column 2. I want the element m [3,2]. If a use
m[[index1,2]] doesn't work.
Thanks
m = {{20, 0.004, na, na}, {18, 0.05, na, na}, {16, 0.06, na, na}, {14,
0.074, 1.05, 0.5}, {12, 0.0104, 0.92, 0.5}, {10, 0.134, 0.82, na}}
In[318]:= index1 = Position[{20, 18, 16, 14, 12, 10}, gagev]
Out[318]= {{3}}
In[373]:= m[[index1, 2]]
During evaluation of In[373]:= Part::pkspec1: The expression {{3}} cannot be used as a part specification. >>
Out[373]= {{20, 0.004, na, na}, {18, 0.05, na, na}, {16, 0.06, na,
na}, {14, 0.074, 1.05, 0.5}, {12, 0.0104, 0.92, 0.5}, {10, 0.134,
0.82, na}}[[{{3}}, 2]]