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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

this array index is invalid for this array please help me

marubeni
5-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

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

 

Alan

View solution in original post

14 REPLIES 14

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

 

Alan

marubeni
5-Regular Member
(To:AlanStevens)

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

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

 

Alan

marubeni
5-Regular Member
(To:AlanStevens)

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


@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

marubeni
5-Regular Member
(To:AlanStevens)

Thank you very much !

marubeni
5-Regular Member
(To:AlanStevens)

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 !

 

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

marubeni
5-Regular Member
(To:terryhendicott)

Thanks my brother ! 

marubeni
5-Regular Member
(To:terryhendicott)

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 !

 

You do not match the dimensions of the arrays.

 

Pic_1.png

Hi,

 

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

 

Capture.JPG 

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

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

This Index wrong!

TraceError.png

Top Tags