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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

this value must be a matrix or a scalar

zaki_rhm
8-Gravel

this value must be a matrix or a scalar

Ashampoo_Snap_dimanche 16 décembre 2018_23h51m55s_002_.png

3 REPLIES 3
Werner_E
25-Diamond I
(To:zaki_rhm)

Its hard to debug a picture! Especially a pic where you don't show the definition of all variables in use!

Always better to send the worksheet!

 

Try typing Tb(n2) instead of just Tb when you define your function X

 

 

Thanks.

Werner_E
25-Diamond I
(To:zaki_rhm)

OK, two problems:

 

The first one is as already said in my first answer that you defined Tb as a function and therefore you have to use it like a function and not like a variable.

 

The second problem is the range (0 to 2) you are looking for a zero of function X.

In this range X has two zeros and a pole! The pole at approx n2=0.976087 is the reason that "root" would fail.

Solution is to use "root" twice with smaller intervals (which can be seen in the plot). You have to decide which of the two zeros is the one appropriate for your problem.

B.png

Worksheet in format Prime 5 attached

 

Announcements

Top Tags