# How to find the positions of replaced elements in a list

I have two sets of elements

a={3, 4.8, 5, 4.2, 3.6, 2.3, 4.5, 3.7}

b={2.8, 4.7, 5.3, 3.5, 4.7, 2.8, 4.2, 3.4}

and I create a new set which compares elements of the sets and takes their minimum

c=MapThread[Min, {a, b}]


({c=2.8, 4.7, 5, 3.5, 3.6, 2.3, 4.2, 3.4})

And now I want to find positions of elements in the new set which were changed to smaller elements. So I would like to get something like

{{1},{2},{4},{7},{8}}

Any ideas how could I do it? Thank you for any advices.

Position[0] @ Unitize[b-c]

Position[Alternatives @@ b] @ c

Lookup[PositionIndex @ c, DeleteDuplicates @ b, Nothing]

Map[List] @ Pick[Range @ Length @ c, Unitize[c - b], 0]


all give

{{1}, {2}, {4}, {7}, {8}}

For large input lists, the last one, or a slightly modified version of it

Map[List] @ Pick[Range @ Length @ c,DeveloperToPackedArray @ Unitize[c - b], 0]


is faster than the others.

Position[MapThread[Greater, {a, b}], True]
(*    {{1}, {2}, {4}, {7}, {8}}    *)
`