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

combining two formulas to plot one graph

Seb
4-Participant
4-Participant

combining two formulas to plot one graph

Hi all,

 

is it possible to combine the two graphs and formulas I have set up,

to get the two graphs they produce shown in one?

I don´t know how to solve it as the two formulas have two different boundary conditions.

 

Regards

Seb

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:Seb)

Looking for something like this?

Werner_E_0-1645650086851.png

The range variable is only needed for plotting, so it must not be defined in front of the calculations!

 

In case you need two distinct plots (maybe differently colored) you have to define two different range variables which of course must be named differently.

Werner_E_1-1645650574956.png

 

 

 

View solution in original post

4 REPLIES 4
Werner_E
24-Ruby V
(To:Seb)

Looking for something like this?

Werner_E_0-1645650086851.png

The range variable is only needed for plotting, so it must not be defined in front of the calculations!

 

In case you need two distinct plots (maybe differently colored) you have to define two different range variables which of course must be named differently.

Werner_E_1-1645650574956.png

 

 

 

Seb
4-Participant
4-Participant
(To:Werner_E)

@Werner_E 

 

Do you know how to put the results of the curve into an excel sheet in form of x and y values?

Because it worked with the values for r1 and r2 but for y1(r1) and y2(r2) it does not work out

Thank you for any help you can give me.

 

Regards

Seb

Werner_E
24-Ruby V
(To:Seb)

So you prefer to stay with two different functions and two different ranges rather than using the single range with the single function y as shown in my first attempt?

 

Anyway, I would use the WRITEEXCEL function to transfer values from Prime to Excel. But you can only transfer vectors and matrices, not ranges!

So you would first create the appropriate vectors for r and y values in Prime, then augment them and write it to an excel sheet.

 

EDIT: Here is an example what to do. I used the approach with just a single function y. To use the approach with different ranges and functions y you would have to create two vectors for r and y each and stack them.

Werner_E_2-1646318392202.png

You may use matrix_ry instead of the dummy ry to save  a little bit of memory 😉

 

Seb
4-Participant
4-Participant
(To:Werner_E)

@Werner_E  thank you for your help. 

In the end I used the single range.

Top Tags