cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

this array index is invalid for this array please help me

SOLVED
marubeni
Regular Member

this array index is invalid for this array please help me

Hi everyone, i have a problem when write a program about aeroelasticity

 

When i type "subscript letter" by press "." , Mathcad said the letter "A1, A2, A3, E1, E2, E3 "  : "this variable is undefined"

But when i type it by "[", Mathcad said with "g(k)" : this array index is invalid for this array

 

Please tell me how can I fix the problem? Thanks all !

1.PNG2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Re: this array index is invalid for this array please help me

Please post the worksheet.  You might need to zip it first.

 

Alan

View solution in original post

14 REPLIES 14

Re: this array index is invalid for this array please help me

Please post the worksheet.  You might need to zip it first.

 

Alan

View solution in original post

Re: this array index is invalid for this array please help me

This my Mathcad file, i hope you can fix it. Thank you very much !

Re: this array index is invalid for this array please help me

terryhendicott identified the problem correctly.  Simply put ORIGIN:=1 at the beginning of the file.

 

Alan

Re: this array index is invalid for this array please help me

i'm just have learn Mathcad for one week, so can you fix it on the file for me. Many thanks !

Re: this array index is invalid for this array please help me


@marubeni wrote:

i'm just have learn Mathcad for one week, so can you fix it on the file for me. Many thanks !


I have done! See the file I attached in my previous reply.

 

Alan

Re: this array index is invalid for this array please help me

Thank you very much !

Re: this array index is invalid for this array please help me

Brother AlanStevens, after you fixed it for me, it was running but i have another problem, when i draw graph, it can not be the same as the graph in the book

 

+ the first graph is drew by me

Capture.PNG

+ the second graph is draw by the person who write the book, 

Capture.PNG

Could you draw the graph same as the second picture ? Thank you very much !

 

Re: this array index is invalid for this array please help me

Hi,

I have added a graph and put the instructions to format it to the left of the graph if this is what you are after.

 

Cheers

Re: this array index is invalid for this array please help me

Thanks my brother ! 

Re: this array index is invalid for this array please help me

hi brother terryhendicott, i know to draw the graph and now i have a problem about new graph

1.PNG

2.PNG

i want to draw the graph same as the second picture but as you see in the first picture, the graph has error.

Here is the program

1.PNG2.PNG

i attach the zip file in post . Thank you so much !

 

Re: this array index is invalid for this array please help me

You do not match the dimensions of the arrays.

 

Pic_1.png

Re: this array index is invalid for this array please help me

Hi,

 

Vladimir is right the dimensions of the array don't match so to draw the graph you need the first entry.

 

Capture.JPG 

Re: this array index is invalid for this array please help me

Hi,

The default is zero based arrays unless you set origin to 1.

You have set E as a three element vector and refered to it as E[1, E[2, and E[3 but by default it is E[0,E[1,E[2.

Two solutions, change the code or set ORIGIN:=1 at top of the sheet.

 

Cheers

Re: this array index is invalid for this array please help me

Click please on the red operatot the right botton of mouse and do Trace Error!

This Index wrong!

TraceError.png

Announcements