I need to create a for loop for a series summation. The sum is from n=-500 to 500. The summation is some function of n multiplied by y^-n. The problem that I am running into is that y is a matrix that needs to be indexed over. Currently, I have something along the lines of
R(m) = R(m) + f(N)*y(m)^(-N)
But am running into problems because N is not the same size as y.