Replies: 1 comment
-
|
I ran into the same issue. The problem is that 0 < x < 5 doesn’t work in this syntax—you need to use a logical AND instead, like (x > 0) && (x < 5). Also, inside the ternary operator you don’t include f(x)=; just return the value. So your expression should be: f(x)=(x > 0) && (x < 5) ? -x^2 + 10*x - 15 : 1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I follow the link, https://github.com/leonhma/obsidian-functionplot/wiki/Supported-function-syntax
Which say can have a condition on function like this:
condition ? expression1 : expression2. But not work for me how to fix it?Here is my expression :
0<x<5?f(x)=-x^2+10x-15:f(x)=1Beta Was this translation helpful? Give feedback.
All reactions