Quote Originally Posted by oogabooga View Post
The two parts do seem to work individually. Unfortunately, the first part modifies the lists of matrix in such a way that the second part won't work afterwards. You need to try to combine them into one pass, all in the same loop.
I've had a few days to dabble in this and unfortunately procrastination got the best of me. I tried combining the two bits in the same loop but all to no avail..

Can you give me some hints as to the logic involved?