I have defined that stoptime {5, 2, 10, 2, 1, 11, 11, 1, 5, 11}
and have the following function pvcosts = (-5/1.05^#) &[stoptime]
Now I want that everytime "stoptime" is 11, the function gets zero. I already thought about modifiying "stoptime", but I want it to stay the way it is.
How can I include a condition, that everytime "stoptime" is 11, "pvcosts" gets zero?
Thanks for your help
pvcosts = If[# == 11, 0, (-5/1.05^#)] & /@ stoptime
? – Pinguin Dirk Apr 21 at 9:20