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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Making a plot from 2 functions in 1

EvanDeV
3-Newcomer

Making a plot from 2 functions in 1

Hi all, 

I have a bending beam function that i would like to plot for the deflection, shear and moment in the beam. I have the deflection as the first normal bending part that is represented by afunction and the unloaded part after it, with a different function. I had it in Mathcad15 however now after converting to mathcad prime 7 it doesnt plot anymore. 

Thank you ! 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Werner_E)

Addendum:

Guess I found the true problem. Its a limitation in Prime.

The sheet uses an undocumented trick to turn a range into a vector.

This works the same in Prime, too, but in Prime you are not allowed to change the units of the displayed result.

Thats the reason for the error here

Werner_E_2-1689253757768.png

Solution is to delete the "mm" at the end - Prime will display the vector using the default unit meter. Don't try to change that - you can't.

Werner_E_3-1689254089240.png

But of course you can change the displayed unit when you evaluate x in a separate region (but there is no reason why you should do that)

Werner_E_4-1689254162522.png

Now x is a valid vector and can be used for the plots.

What I wrote before about units at the scaling values still applies.

Furthermore its necessary to vectorize (the arrow over the expressions) the function calls y(x) and M(x) and I would suggest doing so with V(x) as well. Its good habit to use vectorization explicitly when feeding a whole vector into a scalar function and don't rely on Primes automatic implicit vectorization.

After doing so you should see your plots. Maybe you have to tweak the scaling here and there

Werner_E_5-1689254322505.png

I attach the modified sheet, but its in Prime 9 format so you will not be able to open it with Prime 7 😞

 

 

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:EvanDeV)

units are not allowed for the axis limits - the scaling values for the axis. So simply use 0 for the first ine on the x-axis and not 0m.

Use L/m for the last one and not L.

Same at the y-axis where you have to use F/kN at the first and last value.

Furthermore you can't use units with  Primes quickplot feature (plotting without defining the abscissa values (x) and let Prime chose an appropriate step width).

So either use the quickplot with a unitless x and provide the unit (meter) in the function call

Werner_E_0-1689252822356.png

or define a range for the x-values with the proper unit to be used in the plot

Werner_E_1-1689252911400.png

 

Werner_E
25-Diamond I
(To:Werner_E)

Addendum:

Guess I found the true problem. Its a limitation in Prime.

The sheet uses an undocumented trick to turn a range into a vector.

This works the same in Prime, too, but in Prime you are not allowed to change the units of the displayed result.

Thats the reason for the error here

Werner_E_2-1689253757768.png

Solution is to delete the "mm" at the end - Prime will display the vector using the default unit meter. Don't try to change that - you can't.

Werner_E_3-1689254089240.png

But of course you can change the displayed unit when you evaluate x in a separate region (but there is no reason why you should do that)

Werner_E_4-1689254162522.png

Now x is a valid vector and can be used for the plots.

What I wrote before about units at the scaling values still applies.

Furthermore its necessary to vectorize (the arrow over the expressions) the function calls y(x) and M(x) and I would suggest doing so with V(x) as well. Its good habit to use vectorization explicitly when feeding a whole vector into a scalar function and don't rely on Primes automatic implicit vectorization.

After doing so you should see your plots. Maybe you have to tweak the scaling here and there

Werner_E_5-1689254322505.png

I attach the modified sheet, but its in Prime 9 format so you will not be able to open it with Prime 7 😞

 

 

Announcements

Top Tags