Get Help

Turn on suggestions

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

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Inequality Inside Given Find Block

Options

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

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

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-22-2020
04:55 PM

01-22-2020
04:55 PM

I'm using a Given - Find block for an equation with multiple solutions. I'm trying to use an inequality sign "<" to force the solver to give me a solution in a certain range of values. The solver seems to ignore the inequality sign. Is this a bug? Does the Given Find block ignore inequality signs? Or am I doing something wrong?

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-22-2020
06:36 PM

01-22-2020
06:36 PM

You are doing nothing wrong and you should get the desired result.

The problem is well know and has to do with the units used. You are using pF in your calculations but Mathcads solve block will work with values in the default unit F. That way the values for C.shunt internally are so small, that we fall below a certain limit of numerical precision. Mathcads solve block usually does not distinguish between < and <=, so even if you demand C.shunt to be smaller than 120 pF, Mathcad would also be happy if its equal and the values are so small that for Mathcads precision they are considered equal. Setting CTOL to a smaller value should cure that problem, but unfortunately Mathcad solve block fails, not finding a solution at all.

You may have noticed that its also a matter of the guess value. If you set it to 11 pF you get the desired solution.

One way to cope with the problem is by multiplying the values in your inequation by a large number, like

A better way IMHO is to make the inequation unitless:

This solves the problem and you get the desired 101.9 pF without having to change the guess value.

6 REPLIES 6

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-22-2020
06:36 PM

01-22-2020
06:36 PM

You are doing nothing wrong and you should get the desired result.

The problem is well know and has to do with the units used. You are using pF in your calculations but Mathcads solve block will work with values in the default unit F. That way the values for C.shunt internally are so small, that we fall below a certain limit of numerical precision. Mathcads solve block usually does not distinguish between < and <=, so even if you demand C.shunt to be smaller than 120 pF, Mathcad would also be happy if its equal and the values are so small that for Mathcads precision they are considered equal. Setting CTOL to a smaller value should cure that problem, but unfortunately Mathcad solve block fails, not finding a solution at all.

You may have noticed that its also a matter of the guess value. If you set it to 11 pF you get the desired solution.

One way to cope with the problem is by multiplying the values in your inequation by a large number, like

A better way IMHO is to make the inequation unitless:

This solves the problem and you get the desired 101.9 pF without having to change the guess value.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-23-2020
07:12 AM

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-24-2020
04:21 PM

01-24-2020
04:21 PM

Re: Inequality Inside Given Find Block

Thanks! Cshunt/pF<120 works great.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-24-2020
04:27 PM

01-24-2020
04:27 PM

Re: Inequality Inside Given Find Block

Thank you for your detailed response. I noticed a couple things that I haven't seen before.

How do you type the double lines for your parallel impedance function ("||") without Mathcad interpreting it as the absolute value function?

What do statements like fs=fs accomplish?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2020
03:45 AM

01-25-2020
03:45 AM

Re: Inequality Inside Given Find Block

[CTRL-SHFT-k] toggles between normal entry and entry of symbols. That's how you can enter | and others.

The statement f:=f essentially undefines f for the symbolic processor. But f remains defined for the numeric processor.

Success!

Luc

The statement f:=f essentially undefines f for the symbolic processor. But f remains defined for the numeric processor.

Success!

Luc

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-25-2020
04:49 AM

01-25-2020
04:49 AM

Re: Inequality Inside Given Find Block

Hi!,

there's nothing new - it's all in Mathcad's guide. You should check it out. I send you a photo related to the topic of operators: