Skip to main content
1-Visitor
September 12, 2010
Solved

Multi-variable Equations and 3-D Plots

  • September 12, 2010
  • 3 replies
  • 7046 views

Hello again (still Mathcad 12 user),

I’m trying to generate 3-D plots of three different equations, where the 2nd and 3rd use the 1st .

Each equation is a function of two variables.

I want the 3-D plots to show the value of the equation in ‘z’ and the range of the variables in ‘x’ and ‘y’ (surface plot).

Attached are three files of three different approaches.

  1. Prob 5.10.xmcd
    1. I was able to generate the graph of the first equation, but the second, despite simplification, returns the error message, “This value must be a scalar or an array.” The function is defined properly, as best that I can tell.
  2. Prob 5.10a.xmcd
    1. This builds on a method to find a single vector driven variable given to me by Stuart Bruff.
      [I seem to not be able to get the original to work, despite copying everything required from the original file.]
      The original file name is: solve_block_problem_186_859.mcd at:
      http://communities.ptc.com/message/23151#23151
    2. Even though, I believe, I set the solve block up correctly, when I get to the vectorize part the following error occurs, “This value must be a function.”
  3. Prob 5.10b.xmcd
    1. This uses the vector approach for the variables, but only generates results using η for η for the two variables, thus generates a single curve and not a surface.

How can I achieve my aim of displaying the range of possibilities as a 3-D plot for all equations?

Thank you,

MNM

Best answer by RichardJ
Prob 5.10.xmcd
    1. I was able to generate the graph of the first equation, but the second, despite simplification, returns the error message, “This value must be a scalar or an array.” The function is defined properly, as best that I can tell.

If you click on the expression you should notice that there is an implicit multiplication between cos and (theta).

Prob 5.10a.xmcd
    1. This builds on a method to find a single vector driven variable given to me by Stuart Bruff.
      [I seem to not be able to get the original to work, despite copying everything required from the original file.]
      The original file name is: solve_block_problem_186_859.mcd at:
      http://communities.ptc.com/message/23151#23151
    2. Even though, I believe, I set the solve block up correctly, when I get to the vectorize part the following error occurs, “This value must be a function.”

There are several undefined variables. Please define them with realistic values and repost the worksheet.

3 replies

RichardJ19-TanzaniteAnswer
19-Tanzanite
September 12, 2010
Prob 5.10.xmcd
    1. I was able to generate the graph of the first equation, but the second, despite simplification, returns the error message, “This value must be a scalar or an array.” The function is defined properly, as best that I can tell.

If you click on the expression you should notice that there is an implicit multiplication between cos and (theta).

Prob 5.10a.xmcd
    1. This builds on a method to find a single vector driven variable given to me by Stuart Bruff.
      [I seem to not be able to get the original to work, despite copying everything required from the original file.]
      The original file name is: solve_block_problem_186_859.mcd at:
      http://communities.ptc.com/message/23151#23151
    2. Even though, I believe, I set the solve block up correctly, when I get to the vectorize part the following error occurs, “This value must be a function.”

There are several undefined variables. Please define them with realistic values and repost the worksheet.

MNM1-VisitorAuthor
1-Visitor
September 13, 2010

Yep,

Once I rewrote the errant cosine function, I was able to move forward along this path.

Thanks, for being there to double check!

When the first errored, I started the other approaches.

They can be forgotten for this problem.

Could a solve Block be used to solve for two variables? If so how?

MNM

19-Tanzanite
September 13, 2010
Could a solve Block be used to solve for two variables? If so how?

Sure. You just need two equations that depend on the variables to be solved for.

MNM1-VisitorAuthor
1-Visitor
September 14, 2010

If you're interested, here is the completed worksheet.

MNM

MNM1-VisitorAuthor
1-Visitor
September 15, 2010

For those REALLY interested, here is the final report.

I'd like to comment, being the originator of this thread, I AM saddened by the turn of it taken by jean Giraud into a rant against Mathcad / PTC..

To him, I suggest he start his own weblog/twitter ccount to do so.