Skip to main content
1-Visitor
February 23, 2021
Solved

Mathcad not able to plot a graph?

  • February 23, 2021
  • 1 reply
  • 5914 views

Hi all,

I need some help plotting graphs. I have defined the function f(t) however Mathcad still says the function is undefined. Please provide solution. I have attached a screenshot have a look.

Best answer by Werner_E

For more versatility I would make the peak voltage V an argument of all functions involved:

Werner_E_1-1614125944290.png

You don't need symbolical evaluation for plotting, but of course you could inspect the values of the coefficients that way:

Werner_E_3-1614126977863.png

If the last symbolic representation is important for you, you may try to define A1 and B1 separately like A0 and let the sum beginning from n=2.

 

Prime 6 sheet attached

 

 

1 reply

23-Emerald IV
February 23, 2021

In order to plot, Prime needs the function to be numerically known. That means that all symbols you use must be numerically defined, have a value.

In your function you have two DIFFERENT symbols V, one is blue, it is a unit (for Volt), and while that is numerically defined as 1 V, you have defined the function such that you transform it symbolically. The symbolic processor, which is happy to deal with (numerically undefined) symbols, doesn't know about units and treats them as (unknown) symbols. So it transforms the V into a V. Now you want to plot it. That's a task for the numeric processor, that doesn't know the value of V, and (rightfully) complains that the function is 'undefined'.

Possible solutions:

1. Don't transform the function symbolically.

2. Define V:=1 V. before the function definition.

 

Success!
Luc

 

So now you ask: But what about   , I didn't define   t   numerically?

Prime allows ONE variable to be undefined for a plot, that is the argument to the function, which it automatically and invisibly (behind the scenes) defines as a range variable from -10 to 10. That's why the plot shows that range along the x-axis.

But it's OK to override that automatic definition If you define t:=0,0.1...1 before the plot, it'll plot your function from t=0 to 1 in steps of 0.1.

1-Visitor
February 23, 2021

okay so I avoid doing the symbolic transformation and then define t and then it should work? Have a look at this file, is this what you wanted me to do?

 

Werner_E25-Diamond IAnswer
25-Diamond I
February 24, 2021

For more versatility I would make the peak voltage V an argument of all functions involved:

Werner_E_1-1614125944290.png

You don't need symbolical evaluation for plotting, but of course you could inspect the values of the coefficients that way:

Werner_E_3-1614126977863.png

If the last symbolic representation is important for you, you may try to define A1 and B1 separately like A0 and let the sum beginning from n=2.

 

Prime 6 sheet attached