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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Solving TL Problem..

sozturk
1-Visitor

Solving TL Problem..

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.

2 REPLIES 2

There are a few points that will need to be clarified before we can find a solution to your question.

Capture.PNG

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):

Capture.PNG

are these what you intended or is this the first part of the solution

Werner_E
25-Diamond I
(To:sozturk)

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.

Announcements

Top Tags