Help with parseEquation

I’m just figuring out the parseEquation stuff and I have a question. I can make it so that when an equation is typed, it will graph. However, I am wondering if I can get it to graph only after the submit button is pushed, as opposed to graphing while typing. I think this is a bit beyond my CL abilities right now.

Here is my screen:

Just make a conditional for your function. I usually use an undefined function as the alternate, so nothing graphs:

function("f"): when math.submitted parseEquation(math.latex).differenceFunction("x","y")
otherwise simpleFunction(`1/0`,"x","y")

Thank you. That makes sense to me, but I’m getting an error. Thoughts? Am I in over my CL head here? :slight_smile:

Oops. Make the simpleFunction in terms of x and y:

... simpleFunction(`1/0`,"x","y")

(Also, edited above.)

Thank you!!! I definitely have to learn more about this CL!

The error showing up was that the different outputs of a when-otherwise need to be of the same type, in this case a function in terms of x and y.

1 Like