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
- :
- Re: Unable to plot a Function with Units calling a...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- 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
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-12-2015
06:15 PM

09-12-2015
06:15 PM

I would like to plot directly from a *function* I've written in Mathcad 15 (MC15) to plot data across values of one parameter, input as either a *range variable* or a *vector*, but am unfortunately unable to make this work.

The function, ** Tsrfc()** calls a

If plotting directly from a call to this function in a worksheet is not possible, then I would like to call the function in an *in-line program*, populating a vector, which I can then plotted. Please advise.

Thanks.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

09-13-2015
03:37 AM

09-13-2015
03:37 AM

See if the attached helps.

Alan

(NB The graph is plotted in the default SI units)

6 REPLIES 6

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

09-13-2015
02:08 AM

09-13-2015
02:08 AM

Re: Unable to plot a Function with Units calling a Solve Block

You have the f(x, y, z)=0 close function! (or f1(x, y, z)=f2(x, y, z))

You would like to input x and y and calculate (and show on the plot) z

to input y and z and calculate (and show on the plot) z

to input x and z and calculate (and show on the plot) y?

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

09-14-2015
08:41 AM

09-14-2015
08:41 AM

Re: Unable to plot a Function with Units calling a Solve Block

I appreciate your response Valery.

I do not fully understand the questions but possibly referring to either Alan's or Werner's solutions could clarify them for you as both allow the function to work the way I need it to work.

Thanks,

John G.

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

09-13-2015
03:37 AM

09-13-2015
03:37 AM

See if the attached helps.

Alan

(NB The graph is plotted in the default SI units)

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

09-13-2015
05:56 PM

09-13-2015
05:56 PM

Re: Unable to plot a Function with Units calling a Solve Block

Thank you for the solution Alan. With the technique you provided I am able to make progress again.

I see that my function, * Tsrfc()* and each of the input parameters that change with insulation thickness (

Again I appreciate your help.

John G.

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

09-13-2015
06:24 AM

09-13-2015
06:24 AM

Re: Unable to plot a Function with Units calling a Solve Block

I am not sure but as I understand it, you want to calculate the surface temperature T.surface dependend on just the insulation thickness t.insl.

But your function T.srfc is defined as being dependent on 17 arguments, none of which is t.insl. I have rather found two function arguments which in their turn are dependent on t.insl, that are r.insl_out and r.air_in. Hope I have not missed any other variables dependent on t.insl.

BTW, does it really makes sense to keep r.insl and r.air_in as separate parameters? You define r.air_in:=r.insl anyway, so you could replace one for the other in your function anyway and reduce to 16 arguments.

So why not create a function for the surface temperature with just one argument, t.insl. You can use that function for evaluating single temperatures, plotting T.surface over t.insl or to evaluate a vector of thickness values (you would have to use vectorization to do this).

Hope the attached sheet will help.

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

09-13-2015
06:24 PM

09-13-2015
06:24 PM

Re: Unable to plot a Function with Units calling a Solve Block

This answer is also correct (however I need to find out how to mark it as such, now that I have already declared one answer correct).

Thank you Werner for your helpful solution. This also works, and it seems is elegant, which I appreciate. Thankfully I have two optional solutions to consider.

John G.