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

Translate the entire conversation x

About Plotting in Mathcad Prime 9

DDHH2001
8-Gravel

About Plotting in Mathcad Prime 9

first time posting a question and I lack experience about using Mathcad Prime 9.I was trying to realize what I have done in MATLAB by using Mathcad prime 9. After judging the working range(time) , and calculating the corresponding currents, I hope to plot the result on a 2D sheet but find no solutions.

ACCEPTED SOLUTION

Accepted Solutions

Hi

Two methods are available Plot component or from the plot menu.

Capture3.JPG

View solution in original post

4 REPLIES 4

Hi

Two methods are available Plot component or from the plot menu.

Capture3.JPG

THANKS A LOT! I see where my problem is. I didnt know the subscript tells the information of the matrix. I was trying to use "[ ]" to quote, just like in matlab.
Many thanks again!

Werner_E
25-Diamond I
(To:DDHH2001)

In Prime you can plot one vector over another, but Prime only understands a vector to be a column vector, not a row vector.

Your function "calculate" returns five row vectors.

So I would suggest to use the transpose operator already at the end of function "calculate" so it returns column vectors and you also may assign the result of this function to a 1x5 matrix of meaningful variable (names) so you don't have to manipulate the result variable "plott" to access the individual vectors for plotting.

Werner_E_0-1746435400328.png

 

Prime 9 sheet attached

 

BTW, one of the strengths of Prime is that you can use units in a natural way so I would suggest that you add units to your calculations right from the start.

 

EDIT: I overlooked that in case 1 and 2 you only return two vectors and not five.

One way to cope with that could be a small program which replaces the non-existent vectors by zeros. That way they only show as a tiny dot at the left of the plot. We could replace the zero by a NaN, but this would result in a nasty red error in case 1 & 2.

Of course you could also already modify your function "calculate" so that it returns a 5x1 nested matrix in all cases.

Werner_E_0-1746436591270.png

Modified Prime 9 sheet attached

 

Many thanks to you! I would refine my file again based on your modification. You really help me a lot. The "overlook" you pointed out is exactly what I am trying to fix. Thank you again for your meticulous answer!

Announcements

Top Tags