Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Because I use both numeric differential equation solvers and programming blocks, most of my Mathcad worksheets' outputs that I want to plot are in the form of range variables. Is there a way to plot a Range Variable using the Mathcad 5.0 Charting Component? If I set either the X or Y input for a chart component to a range variable, I get an error "The variable name for this input expression is not valid." I tried including and excluding the range subscript in the assignment to X and Y and get the same error with or without the subscript.
Range variable plots work just fine using a normal graph.
Tom
I can only find PTC references claiming that Prime 5 has 'new' plotting facilities.
Not that they're 'better'.
Considering PTC's record, I'm not surprised about what you experience.
(Without own experience) I'm afraid you'll have to change your ranges into vectors in order to use the new plotting facilities of Prime 5.
Success!
Luc
I should have said plot a vector defined by a range variable
I get the same error with and without the range subscript in the assignment statement for the graph
I should have said plot a vector defined by a range variable
Hi,
Mathcad 15 shows a range variable in different format to a vector. You can tell the difference by looking at them. Prime has done away with this with both showing the same way onscreen. You can no longer tell them apart visually.
Try the following file in 5.0. y is a vector, iy is a range variable.
Cheers
@tfetter wrote:
Because I use both numeric differential equation solvers and programming blocks, most of my Mathcad worksheets' outputs that I want to plot are in the form of range variables.
Thats sure a bad habit that you should change.
You can't assign those outputs to variables nor can you export them to a file.
That kind of "result" outputs are just good for looking at but not for using them any further.
Ranges are not supposed to be used that way! They should only be used for indexing matrix elements, defining a plot range or in a for loop when you are programming.
The new chart component is a big disappointment for various reasons discussed in other threads here and I am not surprise that you experience some limitations as opposed to the normal graph.
BTW, you may already have realized that you can't embed pictures in your post by simple drag and drop. You have to save the picture first and then use the "Insert Photo" option from the menu line - quite awkward.
As I mentioned above, I misstated the variable type - my issue was not plotting range variables but plotting vectors with range variable indices.
It was my error - Chart Components do support plotting vectors. My error was due to typing the X and Y axis expressions as X(Ctrl-)1 rather than X[1 - that is as a literal subscript rather than a index subscript.