Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
I tried to write a program using the attached algorithm. However I keep getting "This array index is invalid for this array" error. It occurs in various places when I try to fix it.
Solved! Go to Solution.
You have not assigned a value to z[n, only to z[n-1.
You have not assigned a value to z[n, only to z[n-1.
Yeah I just figured this out few minutes ago. And the 'N=1000' value was unreasonable as well.