cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Variable is undefined during XY-plotting

SOLVED
CL_9697643
Visitor

Variable is undefined during XY-plotting

I want to plot a few functions but

Mathcad tells me that my range variables x and x2 are undefined even though i just defined them.

 

I am new to this program and i cant figure out what im doing wrong.

 

The problem is at page 10.

 

2021-01-17_21-31-47.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Variable is undefined during XY-plotting

It is obvious what you did wrong and hence why Prime is complaining.

The parentheses ( ) for the y-axis items are intended for units. You put x and x2 in there. These are NOT defined as units (as opposed to m, kg etc) .

Note how their colour is different from the x and x2 that you defined... Different colour means different label of an item, which means its a different thing.

Remove the x and x2 from the y-axis and this error message is gone.

But you'll get another one. YAB and YBC are functions, so you'll have to put them in the plot as functions. This means you'll have to type (at least) an open bracket to the right of each, but before the brackets for the unit, and you want to fill in x and x2 for the arguments to those functions.

That 'll give you the plot for YAB, but not for YBC, because there's an error in that function. I think that C3 is defined incorrectly. It has the wrong unit.

Solve that and you should be done.

 

Success!
Luc

View solution in original post

2 REPLIES 2

Re: Variable is undefined during XY-plotting

It is obvious what you did wrong and hence why Prime is complaining.

The parentheses ( ) for the y-axis items are intended for units. You put x and x2 in there. These are NOT defined as units (as opposed to m, kg etc) .

Note how their colour is different from the x and x2 that you defined... Different colour means different label of an item, which means its a different thing.

Remove the x and x2 from the y-axis and this error message is gone.

But you'll get another one. YAB and YBC are functions, so you'll have to put them in the plot as functions. This means you'll have to type (at least) an open bracket to the right of each, but before the brackets for the unit, and you want to fill in x and x2 for the arguments to those functions.

That 'll give you the plot for YAB, but not for YBC, because there's an error in that function. I think that C3 is defined incorrectly. It has the wrong unit.

Solve that and you should be done.

 

Success!
Luc

View solution in original post

Re: Variable is undefined during XY-plotting

Thank you for your time!

 

I have redifined C3 and C4 and now it works!

 

Such a simple error, but hard if your new to this pogram. 

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."