Skip to main content
1-Visitor
Question

This array index is invalid for this array

I use mathcad program.

I want to have "sys_r" graph.

I try a below captured programming.

But programming error occurred.

programming error!

Error is "This array index is invalid for this array."

I don't know solution.

Please help me.

zxczxczxc.JPG

graph shape example !

14124.JPG

5 replies

24-Ruby IV

Try please ORIGIN:=1

Translate
19-Tanzanite

Mathcad counts from 0 by default. Because you set j = 0..2, and you have a 3x3 matrix with elements numbered from 0,0 to 2,2, when j = 2 then j+1 = 3, and there is no element with a j index of 3. Simply setting ORIGIN to 1 (so Mathcad counts from 1 instead of 0) won't cure this as you use both j+1 and j in the routine, so if ORIGIN = 1, you can't have j = 0.

If you correct this, you will have a problem with index i, as this runs from 1 to 3.

Alan

Translate
1-Visitor

Thanks you.

I clear the error.

But I don't draw a graph.

12.JPG

Different from the example graph.

I want an example graph

I want to have a hint to draw an example graph.

I ask heartily. Plzzzzzzzzzz...

Translate
23-Emerald I

An example of how to plot a vector against its index.

Translate