Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
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.
graph shape example !
Try please ORIGIN:=1
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
Thanks you.
I clear the error.
But I don't draw a graph.
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...
지환 황 wrote:
Thanks you.
I clear the error.
But I don't draw a graph.
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...
I suspect the major reason you show a straight line is that your program reassigns the next calculated value to sys_r, so a will get the last value calculated and will be a scalar. If you want to return all of the sys_r values then you need to convert sys_r into a vector (by assigning it an index variable and incrementing the index variable everytime you update sys_r.
See attached worksheet for an example. I haven't tried to fix your program's indexing, just limited j to get it to output something.
Stuart