Sorry somthing went wrong error, iteration command

Thulani shared this question 1 week ago

What could be wrong here?

Execute({"Iteration[SetCoords(" + Element[strLst,cnt] +", x(Element[L_1', cnt]),y(Element[L_1', cnt])),cnt,{1},5]"})

I have a list strLst={"A","B","C","D","E"} these are points.

I want to replace this as I will have many points:

Execute({"SetCoords(" + Element[strLst,1] +", x(Element[L_1', 1]),y(Element[L_1', 1]))"})

Execute({"SetCoords(" + Element[strLst,2] +", x(Element[L_1', 2]),y(Element[L_1', 2]))"})

Execute({"SetCoords(" + Element[strLst,3] +", x(Element[L_1', 3]),y(Element[L_1', 3]))"})

Execute({"SetCoords(" + Element[strLst,4] +", x(Element[L_1', 4]),y(Element[L_1', 4]))"})

Execute({"SetCoords(" + Element[strLst,5] +", x(Element[L_1', 5]),y(Element[L_1', 5]))"})

Is there a better way to achieve this?

Thanks in advance.

Comments (2)


What is the definition of list L_1?


can you please explain more to "I want to replace this (points?) as I will have many points:"

maybe you mean: move ?

and maybe you mean: "and I have a lot of points to move"


and please: send your ggb-file


Thanks, you helped me solve this in another question.

© 2018 International GeoGebra Institute