Suppose I have a list of pairs of complex numbers with nesting as follows
{
{{1.91885 + 0.09170475 I, 1.91901 + 0.0629745061 I},
{1.91837 + 0.092182 I, 1.9189 + 0.063 I},
{1.9837 + 0.2182 I, 1.99 + 0.063 I},
{1.91837 + 0.0921 I, 1.89 + 0.3 I}},
{{1.91 + 0.091 I, 1.91 + 0.062974 I},
{1.918 + 0.092 I, 1.89 + 0.63 I},
{1.915 + 0.0915 I, 1.9191 + 0.05061 I}
}
}
In reality, the list I am working with has many more sublists (here I've just shown two) and many more elements in each sublist.
I am trying to extract the second component of each pair of complex numbers while maintaining the nesting so here the expected output would be
{{1.91901 + 0.0629745061 I, 1.9189 + 0.063 I, 1.99 + 0.063 I,1.89 + 0.3 I},
{1.91 + 0.062974 I, 1.89 + 0.63 I, 1.9191 + 0.05061 I}}
I have tried defining a function sec[z_]:=Part[z,2]
and using Map
or Apply
to get what I want but this doesn't seem to work. Is there a way to do this?