+ 1
Here I try to do a random walk, and calculate the average position (cmcoord), but I get an indexation error.Can anyone spot why?
2 ответов
+ 2
I think the reason for that is because you're trying to call an index number that doesn't exist for r. From what I can see, all r equals is [[x,y]] meaning that it's maximum index is [0][1]. Because i is set to the first index (in the example it would be 0), it is trying to find a number at an index that doesn't exist.
Hope this helped!
+ 1
Thanks Faisal! I think you are right :)