Suppose I have a table, u, which is created as follows:
u = {};
u1 = Table[678, {y, 1, 10}];
u2 = Table[1888, {y, 1, 10}];
u = AppendTo[u, Thread[{1, u1}]];
u = AppendTo[u, Thread[{2, u2}]];
It is essentially an x-y grid of values where, for example, x1 = 1 (the x-coordinate at point 1) and x2 = 2. Furthermore, we then have vertical "profiles" of y-values lying "on top" of each x-coordinate, where at x1 = 1 we have the value 678 from y = 1 to y = 10, and at x2 = 2 we have the value 1888 from y = 1 to y = 10:
{{{1, 678}, {1, 678}, {1, 678}, {1, 678}, {1, 678}, {1, 678},
{1, 678}, {1, 678}, {1, 678}, {1, 678}}, {{2, 1888}, {2, 1888},
{2, 1888}, {2, 1888}, {2, 1888}, {2, 1888}, {2, 1888}, {2, 1888},
{2, 1888}, {2, 1888}}}
and u[[1]] is the following:
{{1, 678}, {1, 678}, {1, 678}, {1, 678}, {1, 678}, {1, 678},
{1, 678}, {1, 678}, {1, 678}, {1, 678}}
Now, what I'm hoping to do is at x1 = 1, select all the y-values from y = 1 to y = 10 into a single table, where I'll just have
{678, 678, 678, 678, 678, 678, 678, 678, 678, 678}
Does anyone know how I might do this? Thanks
Cases[u, {1, x_} :> x, -1]
$\endgroup$