I have a list (Table
), mostly composed of real numbers. The list also contains some non-real elements. The list is similar to the following (but much much larger):
{{0.11011887269, 0.02087291466, 0.02082444233, 0.02083704779,
0.02084940959, 0.02086181292, 0.02087425501, 0.02088673503,
0.02089925331, 0.02091181001, 0.02092440529, 0.02093703933,
0.02094971232, 0.02096242441, test1[18, 15]}, {0.10941526373,
0.017604005802, 0.017549654594, 0.017558686829, test1[19, 5],
test1[19, 6], test1[19, 7], test1[19, 8], test1[19, 9],
test1[19, 10], test1[19, 11], test1[19, 12], test1[19, 13],
test1[19, 14], test1[19, 15]}, {0.10890647143, 0.014986243752,
0.014927392616, 0.014934004368, test1[20, 5], test1[20, 6],
test1[20, 7], test1[20, 8], test1[20, 9], test1[20, 10],
test1[20, 11], test1[20, 12], test1[20, 13], test1[20, 14],
test1[20, 15]}}
I would like to construct a single row or column list that preserves the last real number element of each row of the above list. For example, with the above table, the resulting list should contain only 3 elements as:
{0.02096242441, 0.017558686829, 0.014934004368}
How can this resulting list be automatically constructed from the original one?
Table[Last[Cases[row, _Real]], {row, d}]
whered
is your list $\endgroup$