Skip to content

Subscript out of Bounds

3 messages · Dat Mai, Duncan Murdoch

#
On 28/04/2011 3:49 PM, Dat Mai wrote:
Just before you get to that line, insert the following:

print(dim(m))
print(i)
print(j)

Take a look at the results, and see if i is really in the range from 1 
to dim(m)[1], and j in the range 1 to dim(m)[2].  From what you're 
saying, it sounds as though j can go to 430, which is too big, if m is 
20 by 20.

Duncan Murdoch