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
- :
- parametric initial guess?

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

11-28-2004
03:00 AM

11-28-2004
03:00 AM

parametric initial guess?

i think this question has come up before, but i couldn't find it in a search. i'm solving a nonlinear equation, with the solution dependent on a parameter, using a solve block (this seems rather more robust that the root function). for various ranges of the parameter, whether mcad finds a solution or not depends sensitively on the initial guess (it might even find the wrong solution, since the problem may have multiple solutions). i have even tried the various different algorithms offered in mcad. since i have some idea of the solution, i suspect that i can tailor my initial guess to the value of the varying parameter. but is it possible to do so directly (or indirectly)?

tia,

dennis

tia,

dennis

Labels:

7 REPLIES 7

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

11-28-2004
03:00 AM

11-28-2004
03:00 AM

parametric initial guess?

Can you post an example worksheet?

Richard

Richard

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

11-28-2004
03:00 AM

11-28-2004
03:00 AM

parametric initial guess?

Yes, you can define a function from the solve block and pass parameters. Such parameters can include the guess values.

Tom Gutman

Tom Gutman

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

11-29-2004
03:00 AM

11-29-2004
03:00 AM

parametric initial guess?

i found a workaround to my initial problem (basically through problem reformulation), but i'm interested in tom's comments, since it might prove useful in other contexts. i'm not quite sure i understand what tom is suggesting. i've attached a simplified extract of my initial problem. as it stands, for a value of my parameter, Q = 20 cfs, mathcad finds no solution for my initial guess y=2.9 ft. if i use a different initial guess, say y=2ft, it does find a solution for this particular Q. For this simple problem, one would simply choose a different initial value. but since it is part of a larger problem, in which a range of values of Q are generated, it will get stuck on one or two values. what i would like is to choose my initial guess depending on the value of Q.

tom, could you please give more details of your suggestion if you think that it addresses the above problem?

tom, could you please give more details of your suggestion if you think that it addresses the above problem?

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

11-29-2004
03:00 AM

11-29-2004
03:00 AM

parametric initial guess?

I don't get the failures you describe. But with some guess values it tends to find the trivial solution with y_{1}=y_{2}, or even an alternative negative solution. But with a high guess value it seems to find the desired solution over a wide range of Q.

Tom Gutman

Tom Gutman

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

11-29-2004
03:00 AM

11-29-2004
03:00 AM

parametric initial guess?

tom,

whoops, looks like i posted the wrong file, so there may be a misunderstanding. i've posted the corrected file. at the bottom, you should see a 'red' statement.

dennis

whoops, looks like i posted the wrong file, so there may be a misunderstanding. i've posted the corrected file. at the bottom, you should see a 'red' statement.

dennis

Highlighted
##

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

11-29-2004
03:00 AM

11-29-2004
03:00 AM

parametric initial guess?

Yes, this file is a bit different, and now the variation in the quess value does make a difference. But the structure is the same. Since you already set up the find as a function, parameterizing Q, all that is needed is to add a parameter for the guess value.

Tom Gutman

Tom Gutman

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

11-29-2004
03:00 AM

11-29-2004
03:00 AM

parametric initial guess?

tom,

that is neat. i tried various things following your suggestion but never quite hit upon such a simple construct.

thanks a bunch, again,

dennis

that is neat. i tried various things following your suggestion but never quite hit upon such a simple construct.

thanks a bunch, again,

dennis

Top Tags