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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Mathcad Prime 6.0 Plotting failed does not work.

KP_9732398
4-Participant

Mathcad Prime 6.0 Plotting failed does not work.

Why I don't want to create a chart.
Will you help?

ACCEPTED SOLUTION

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

There's no need for a solve block, if you're not solving an equation.

See attached file, and it plots...

 

You should carefully read the (online) help of Prime on when and how to use a solve block.

You should also learn about the difference between an index (to point at a specific element of a vector) and a subscript. In your case you many times used an index, where a subscript was needed.

 

Success!
Luc

View solution in original post

4 REPLIES 4
LucMeekes
23-Emerald III
(To:KP_9732398)

There's no need for a solve block, if you're not solving an equation.

See attached file, and it plots...

 

You should carefully read the (online) help of Prime on when and how to use a solve block.

You should also learn about the difference between an index (to point at a specific element of a vector) and a subscript. In your case you many times used an index, where a subscript was needed.

 

Success!
Luc

KP_9732398
4-Participant
(To:LucMeekes)

Thank you very much.

Could you roughly explain the difference and when to use what?

And I have a question:

How to set the scale on the y axis on the X axis I know (x: = 0L, 0.001L..L) but I don't know what about the Y axis.

LucMeekes
23-Emerald III
(To:KP_9732398)

Prime knows two means that result in a subscript: The index subscript and the literal subscript.

The index is obtained by typing a [ after a variable followed by the index. If you look carefully at the screen, you'll see a [ shape between the variable and the index.

LucMeekes_0-1606586321341.png

You use an index to point at elements in a vector. Note that the default indexing starts at 0, determined by the value of the built-in variable ORIGIN. Here's an example for a vector called V:

LucMeekes_1-1606586417179.png

If you now define V[9:23, then you'll end up with a larger vector, where the values of the 5 through 9th elements are all 0, and the 10th element is 23 (note that V[9 is the 10th element because V[0 is the first):

LucMeekes_2-1606586688531.png

As you can see, you can use an index to choose (retrieve and/or define) any single value of an array.

 

A literal subscript is made in Prime by typing [Ctrl _ ] after a variable (that is, you hold the [Ctrl] button depressed and tick the underscore key once), and following that you type the subscript contents. Example:

LucMeekes_3-1606586973389.png

You use a literal subscript to give a special meaning (for you, Prime doesn't care!). Suppose V stands for volume, then Vair might represent air volume and Vliquid might be the volume of liquid:

LucMeekes_4-1606587156182.png

You cannot index Vair and Vliquid because they are scalars, not vectors. That is, You can't use an index to choose between the two.

 

Plot scales: you don't set the plot scale with    x:0,0.1...1   

With that you define x as a range. Note that a range is something completely different from a vector. You cannot index into a range, so you cannot index a separate value in the range x. Ranges are used for a few purposes only:

- to define a range for plotting (The initial plot scale will generally cover the defined range, that's autoscaling)

- to index into an array (in this case the range must consist of integers, whole numbers)

- in a For-loop of a program

- for looping equations on the worksheet

 

The scale of a plot is determined by the first, last and axis crossing value of the plot. With a range x as defined above, you can set the scale of the plot to run from 0 to 0.5, or from -10 to 10 if you like.

To change the scale of the plot, you have to move your mouse over the axis that you want to rescale to a value. There are three values along the axis that you can change. They'll 'light up' when your mouse is over them. Click, and you'll see what you can do to them.

 

Success!

Luc

 

 

 

KP_9732398
4-Participant
(To:LucMeekes)

Thank you for your comprehensive answer. Best wishes. 😄 😄 😄 

Announcements

Top Tags