Skip to main content
1-Visitor
March 9, 2015
Question

This array index is invalid for this array

  • March 9, 2015
  • 2 replies
  • 2242 views

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

2 replies

24-Ruby IV
March 9, 2015

Try please ORIGIN:=1

19-Tanzanite
March 9, 2015

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

1-Visitor
March 9, 2015

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...

23-Emerald I
March 9, 2015

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