- #1
Sarah rob
- 16
- 0
If I have 2 list which are made up of pairs of numbers
e.g.
list1 = {{4, 5}, {2, 10}, {0, 15}}
list2 = {{5, 2}, {3, 7}, {1, 12}}
is there a way I can apply a function (that I have already created, f[x_]) on the lists which runs for e.g. 5 iterative steps with list1 then apply the same function to list2 for a further 5 iterations (iteration steps 6 - 10) , list1 for ieterations 11 - 15, list2 for steps 16 - 20 etc ...
I have been able to use one list using NestList but can't incorporate
alternating 2 list any suggestions ?
e.g.
list1 = {{4, 5}, {2, 10}, {0, 15}}
list2 = {{5, 2}, {3, 7}, {1, 12}}
is there a way I can apply a function (that I have already created, f[x_]) on the lists which runs for e.g. 5 iterative steps with list1 then apply the same function to list2 for a further 5 iterations (iteration steps 6 - 10) , list1 for ieterations 11 - 15, list2 for steps 16 - 20 etc ...
I have been able to use one list using NestList but can't incorporate
alternating 2 list any suggestions ?