Perhaps a very easy question but I posted this on the Wolfram Community and didn't get any answer..
Suppose I have data like:
data = Table[{{Subscript[a, x, 1, 1], Subscript[a, x, 1, 2],
Subscript[a, x, 1, 3]}, {Subscript[b, x, 2, 1], Subscript[b, x, 2,
2], Subscript[b, x, 2, 3]}}, {x, 1, 3}]
Now suppose I wan't to get from all rows the first item in the first list and the third item in the second list like:
It can be done by using:
{data[[All, 1, 1]], data[[All, 2, 3]]}\[Transpose]
or
{#[[1, 1]], #[[2, 3]]} & /@ data
But I'm wondering if there isn't an easier way by only using Part,Extract? It seems that going through the documentation the option only apply to one column (or more) but not to subparts in these columns.
Any thoughts?
{#1[[1]], #2[[-1]]} & @@@ data
$\endgroup$data /. {{f_, __}, {__, l_}} -> {f, l}
$\endgroup$