Author |
Topic |
|
SkBible
2 Posts |
Posted - 11/20/2017 : 3:38:14 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2017 Operating System: Windows 10 64 Bit
I tried to plot z(x,y) = 0.5 + 0.01*(x^3)+0.02*(x)*(y^2) - 0.4*(x)*(y)*(1-(x+y)) + 0.03*y*(1-(x+y))^2 The range of each variable is between 0 and 1. [ 0 <= x <= 1, 0 <= y <= 1] Thanks to OriginPro 2017, I got a decent 3D graph.
However, I am wondering if I can add the condition, 0 <= x + y <= 1. If it is possible, how do I add this condition? Within that specific region, 0 <= x <= 1, 0 <= y <= 1 and 0 <= x + y <= 1, I want to plot this formula.
|
Edited by - SkBible on 11/20/2017 3:48:02 PM |
|
snowli
USA
1386 Posts |
Posted - 11/20/2017 : 4:59:50 PM
|
Hello,
Origin supports conditional operator https://www.originlab.com/doc/LabTalk/guide/Operators#Conditional_Operator_.28.3F:.29
So in Function Plot dialog, enter this formula instead:
(x+y)<1?0.5 + 0.01*(x^3)+0.02*(x)*(y^2) - 0.4*(x)*(y)*(1-(x+y)) + 0.03*y*(1-(x+y))^2:
So if (x+y)<1, it will fill with the formula. If not, it will be filled with missing values. Note: no value or expression after : . BTW, since your x and y both start from 0, i didn't enter (x+y)>0 in condition.
Thanks, Snow |
|
|
SkBible
2 Posts |
Posted - 11/20/2017 : 6:38:33 PM
|
Thank you!
I appreciate your help!
Sincerely,
Sungkyung Kim |
|
|
|
Topic |
|
|
|