Input to Graphing a Function

Is there a way for you to take a input the student in latex and create a graph from that?

I’m trying to have my students match a graph by typing into the input for the correct equation but I would like for them to see what they typed to see if it is correct or not.

I also would like to see if it is correct on the summary I’m not completely sure how to use “I” on the graph to check for correctness. I’m playing with it on my first slide.

Here is the link…

Please HELP!

I figured it out just need someone to explain the I in the correctness check for me.

It looks like this is performing a check over 11 points. If the points are within 0.001 of the actual function value they are given a value of 1, if not 0. That list is totaled to see if all of the points are within that range.

The last comparison is to make sure that the total of that list (how many points are within the correct range) is equal to the number of points being evaluated and if so it is marked correct.

1 Like