Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello,
I'm new to mathcad (express prime 9.0.0.0 and have full functionality for another month), so extra points for being extra articulate 🙂
The image below on the left is what I am trying to accomplish and what I've typed out within Mathcad.
The image below on the right is the book example I am trying to replicate.
I am trying to plot Fr_eff/X vs X with different "p" values, which makes sense when looking at the text.
Some Questions:
Thanks
EDIT: I've attached the worksheet as well
Solved! Go to Solution.
Here's the "magic" 😉
You type square brackets in defining some of the functions. Never do this unless you intend to create a vector/matrix. Only use parentheses . Mathcad 15 and below sometimes used square brackets on expressions with nested parentheses when displaying them, but you never type them in.
The picture shows that the horizontal x-xis also should be logarithmically scaled. You can move the axis with the mouse so they cross at (1; 0.1).
The upper limit 50 on the vertical axis is ignored by Prime - it always choses powers of ten.
Unlike real Mathcad Prime does not offer an option for adding grid lines. Luc an me both had posted workarounds for this. PTC bought a third party tool and integrated it (quite badly and with severe limitations) in Prime. They call it the Chart Component. You may create your plot using it. Its slow and cumbersome to use and does not support units, but it provides many of the very basic things which Primes native plots are missing, like grids, seocondary y-axis, labels, etc. Give it a try and see if it fits your needs.
BTW, here is the plot using the 41 p-values you had set up. I also let Prime chose upper and lower limit of the y-axis automatically, so it now runs from 0.1 to 1000
The variable name FR/X is quite tricky to create. Of course you can use any name you like.
Sheet in format Prime 9 attached
Attach your sheet as well, not just the pictures.
Plotting a family of functions in one go using two range variables is something which worked (with limitations) in real Mathcad,
but it doesn't work anymore in Prime.
There may be workarounds (apart from plotting ten separate curves), maybe using the waterfall trace, but I won't retype from the pic what you already typed 😉
Thanks for the reply, are you able to take a look at the sheet I attached (per your request) and see if you can make some magic out of it?
Here's the "magic" 😉
You type square brackets in defining some of the functions. Never do this unless you intend to create a vector/matrix. Only use parentheses . Mathcad 15 and below sometimes used square brackets on expressions with nested parentheses when displaying them, but you never type them in.
The picture shows that the horizontal x-xis also should be logarithmically scaled. You can move the axis with the mouse so they cross at (1; 0.1).
The upper limit 50 on the vertical axis is ignored by Prime - it always choses powers of ten.
Unlike real Mathcad Prime does not offer an option for adding grid lines. Luc an me both had posted workarounds for this. PTC bought a third party tool and integrated it (quite badly and with severe limitations) in Prime. They call it the Chart Component. You may create your plot using it. Its slow and cumbersome to use and does not support units, but it provides many of the very basic things which Primes native plots are missing, like grids, seocondary y-axis, labels, etc. Give it a try and see if it fits your needs.
BTW, here is the plot using the 41 p-values you had set up. I also let Prime chose upper and lower limit of the y-axis automatically, so it now runs from 0.1 to 1000
The variable name FR/X is quite tricky to create. Of course you can use any name you like.
Sheet in format Prime 9 attached
incredible, thank you sir!
What is the Pj function you had to create?
Why was Fr/X tricky to create? Is that why you had to create subscript variables i and j?
Cheers
What is the Pj function you had to create?
j is a range variable (from 0 to 40) and is used to create a vector P (hence the P with the matrix index j) with the same 41 values as he range p you had used. You see the vector to the right of the definition (tinier font and transposed for space reasons).
Actually I made it customize-able as you can chose the start and stop values p.1 and p.2 and the number of traces. The p-values are equally spaced between p.1 and p.2 using these parameters.
Because I first found that 41 traces would be too much I then created a vector P using just the 10 values which were used in the source you tried to duplicate. This vector was typed in manually as the values are not equally spaced. If you disable this second definition of vector P you get the plot with the 41 traces which you obviously tried to created using the range variable p.
Why was Fr/X tricky to create? Is that why you had to create subscript variables i and j?
Its not the variable, the expression which is tricky to create. Its the NAME of the variable. Prime won't allow to use the character "7" in a variable name. The trick is to type " which creates a string "". In-between the quotes you type F/X -> "F/X" and when the cursor is positioned after X but in front of the quote you press del to delete the quotes. All thats left is to position the cursor after the F and type ctrl- R to create the literal subscript R the usual way. That way you have created a variable name with a special, usually not allowed character in it which you can use like any other variable name. Because the creation of this name is laborious you are better off to use copy and paste when using that name.
The range variables i and j have nothing to do with the tricky name. They are necessary to create the matrix needed for Primes Waterfall plot to work. The matrix has as many rows as the vector X and each column in the matrix represents the ordinate values for one of the curves.
Hi WM_10738028,
Can you share the name of the book, and where this book can be found?
Hello Cornel, "Switching Power Supply Design & Optimization"
Probably Amazon, I got it from Springer, most likely a few other sources as well.