Probably very basic, sorry, but I've searched extensively without finding a solution:
list_2 = ReplacePart[list_1, _?EvenQ -> "Sin(value of the entry in this position in list_1)" ]
That is, creating list_2
, for every second entry replace its value with the Sinus of the corresponding value in list_1
.
So for example {1, pi/2}
should return {1, 1}
. What is the code I should use in "..."?
On a general note: How does one address the value of the "current position" in a list? Thanks.