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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Not able to plot a function with units on the x-axes

Spedex
12-Amethyst

Not able to plot a function with units on the x-axes

Please have a look at the following example-function:

Screenshot 2022-09-14 082452.png

If I want to plot this function with Newton (N) on the y-Axes and Millimeters (mm) on the x-Axes, the following happens:

Screenshot 2022-09-14 082651.png

Unfortunately my Mathcad Prime 8.0 is in German, but the error is the following:
Plotting failed. Replace complex Values or NaN-values with real numbers.

Also you can see that it replaces mm with mm / m.

 

If I erase the units out of the fuction like this:

Screenshot 2022-09-14 083021.png

Then it will work, as you can see here:

Screenshot 2022-09-14 083113.png

 

Does somebody know how I can fix this, so that I do not have to erase the units from my function?

I will leave the mathcad-document attached here.

Greetings
Spedex

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:Spedex)

You have x undefined, in effect you are using a quickplot where Prime will define x for you. It wil have a range from -10 to 10, but no units. The solution is to define x as a range with the proper unit, example:

LucMeekes_1-1663139480855.png

 

Success!
Luc

 

 

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:Spedex)

You have x undefined, in effect you are using a quickplot where Prime will define x for you. It wil have a range from -10 to 10, but no units. The solution is to define x as a range with the proper unit, example:

LucMeekes_1-1663139480855.png

 

Success!
Luc

 

 

Spedex
12-Amethyst
(To:LucMeekes)

Hello LucMeekes,

thank you very much.

I tried it out for myself and it worked.

 

I am facing a new challenge now: negative x-values.

If I define x ike this:
Screenshot 2022-09-14 095800.png

And the plot that occurs is very interesting, but not what it should look like:

Screenshot 2022-09-14 095930.png

 

Do you know how to fix this?
Tried many things, nothing worked out.

I will leave the document attached again.

 

Greetings

Christoph

LucMeekes
23-Emerald III
(To:Spedex)

The definition of a range is:

<range> := <first value> , <second value> .. <last value>

 

and NOT:

<range> := <first value> , <step value> .. <last value>

 

If you change the 1 mm in your definition to -199 mm, it should work as expected.

 

Success!

Luc

 

Spedex
12-Amethyst
(To:LucMeekes)

Thanks a lot, it worked!

 

Greetings

Spedex

ttokoro
20-Turquoise
(To:Spedex)

image.png

Announcements

Top Tags