I am trying to move over a matlab code into python. I have checked line by line and every matrix I am generating upto each element and they are identical upto each element in th