Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Dec 16, 2018
05:53 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2018
05:53 PM

this value must be a matrix or a scalar

Labels:

3 REPLIES 3

Dec 16, 2018
08:54 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2018
08:54 PM

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

Dec 17, 2018
01:30 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2018
01:30 PM

Thanks.

Dec 17, 2018
05:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2018
05:04 PM

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.

Worksheet in format Prime 5 attached