Updating Old Julia Code - Cant get past ArgumentError: Invalid Index

Yeah, there’s an easy way to post formatted code described here: Please read: make it easier to help you but the key is to first do the work to find the minimal set of code that reproduces the problem you want to solve.