Skip to main content
1-Visitor
November 16, 2014
Solved

A problem with plotting

  • November 16, 2014
  • 2 replies
  • 3588 views

Hi guys,

Can you please help me with the following problem. I am not an expert in mathcad.

i want to draw "t" vs final "finalCoOEPcon" in the attached mathcad sheet and Mathcad keeps giving the error that the "value must be real" which i believe is real.

so i have two questions:

1- is the way that i wrote the "equation A" is right in mathcad for solving for "t"?

2-can you help me with some hint that how i can make this curve please?

thank you very much

Best answer by AlanStevens

See attached. I re-arranged your equation to make the solution less sensitive to the initial guess for t.

Alan

2 replies

25-Diamond I
November 16, 2014

The quickplot feature where you are able to provide an undefined variable t on one axis only works, if you put a function dependent on that variable on the other. For instance "t" on one axis, "sin(t)" on the other.

But you are not about to plot functions but simple 20x1 vectors, so t has to be a vector, too. You have to decide which values you will have to assign to that vector.

I created a simple vector consisting of integers from 0 to 19 as an example:

1.png

EDIT: Just noticed your "hidden" vector index. You may use this instead of t.

1-Visitor
November 16, 2014

Thanks for your answer,

I am actually trying to first calculte "t" from equation A first and then plot that calculated "t" vs. finalCoOEPcon.

In that equation everything is known except "t".("finalCoOEPcon" and "finalconccorone" are known and are vectors and M is known and a constant).

Can you please give me a hint how i can get a vector from equation A for variable "t"?

19-Tanzanite
November 16, 2014

See attached. I re-arranged your equation to make the solution less sensitive to the initial guess for t.

Alan

1-Visitor
November 16, 2014

Thanks you very much,

Can you please let me know if I am right about how you corrected this for me? (i just want to understand totally)

when you wrote:

tfn(finalCoOEPcon, finalconcoronene) := find(t)

you actually defined the function "tfn" to calculate "t" and it just tells mathcad to change the two parameters to find "t". right?

and when you said:

t[i := tfn(finalCoOEPcon, finalconcoronene)

we put the value of tfn to t[i.

19-Tanzanite
November 17, 2014

Dave bekam wrote:

Thanks you very much,

Can you please let me know if I am right about how you corrected this for me? (i just want to understand totally)

when you wrote:

tfn(finalCoOEPcon, finalconcoronene) := find(t)

you actually defined the function "tfn" to calculate "t" and it just tells mathcad to change the two parameters to find "t". right?

Correct. At this point the arguments are just dummy arguments.

and when you said:

t[i := tfn(finalCoOEPcon, finalconcoronene)

we put the value of tfn to t[i.

Yes. Now we are passing the actual values of finalCoOEPcon and finalconcoronene to tfn, and assigning the results to the vector t.

Alan