Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi,
i am trying to solve a transmission loss (TL) problem. but at the end, i had an error message "this array index is invalid for this array.". is there anybody who can help me? i read messages from this forum about the error but i couldn't solve the problem. i am attaching my code.
thanks.
There are a few points that will need to be clarified before we can find a solution to your question.
In the snip above you define a function TL_degeri with a parameter f, but the first statement of the program is re-defining that as a range 0 to 100; the value for f at all points following this will be 100.
the for loop that you define only includes the k[1 statement everything after that will only calculate once
all statements that are inlcuded in he for loop should be indented as the K[1.
If you wish to add more lines here then you need to select the line as here before inserting new line(s):
are these what you intended or is this the first part of the solution
Apart from what Andy has pointed out, you ar using matrix indices 1 and 2 where you should have used 0 an 1 (or as an alternative could have set ORIGIN to 1).
Furthermore HxL(f) seems not to be invertible in all case which throws an error, too.