Oh right, I misunderstood. I thought the OP wanted to run their function several times depending on the vector values.