Skip to main content
1-Visitor
February 12, 2013
Solved

This array index is invalid for this array

  • February 12, 2013
  • 1 reply
  • 2452 views

I need some help with a code I am writing.

I am getting an error

"This array index is invalid for this array"

attached is the code

Best answer by Werner_E

Attached is that sheet. Could you please look through it. I think I am doing something wrong with the for loop but I might be wrong.

It's only a simple typo. At the begin of your i-loop you have written Y[i+i which should be Y[i+1.

1 reply

23-Emerald V
February 13, 2013

I think it might be because you have assigned the new value to Δudotdoti instead of udotdoti at the end of the for loop.

Stuart

1-Visitor
February 13, 2013

You were right Stuart.

The reason I got confused was that I had a similar mathcad sheet (actually a complex version of what I sent earlier) which did not have the "udotdoti "error you caught but still showed similar error "This array index is invalid for this array"

Attached is that sheet. Could you please look through it. I think I am doing something wrong with the for loop but I might be wrong.

Appreciate your help.

23-Emerald I
February 13, 2013

For what ever reason, changing the range variable in your uuu() function from i to something else let the program work. (I don't understand why.)