Question: Why is maple using so much memory?

Hey there.

I'm trying to fill out the entries of a matrix. Each matrix element is the result of a very complicated calculation. Currently, I am using nested do loops (two loops total) to scan through each row and column respectively. I find that this process racks up a ton of memory, and that I often run out of memory before the matrix has been completely specified (depending on how big a matrix I want).

First, why is this happening? And second, what is a smarter way to perform the calculation? I will attatch my code below.


Please Wait...