Take parameters to use on graph

Hello,
I’m trying to make an activity.
I made a graph with a function y=ax+b and another function f(x) based on the parameters a and b. I would like a student to write a function inside math input (like y=5x-3) so I can take a and b from his input and show the new function f(x).

Thank for help!

Do you just want to graph the student’s input? Or do you need to extract a and b from the student input? Both are possible, but the second isn’t needed for the first.

To graph it, name the input, then in the graph’s CL:

function(`f`): simplefunction(inputName.latex)

In the graph (not the CL):

y=f(x)
1 Like