GradePlot - Maple Help

 Calling Sequence GradePlot(ref, response, plotview)

Parameters

 ref - an object or a list/rtable of objects representing the correct solutions response - an object or a list/table of objects representing the response(s) to be compared to correct solutions plotview - [range, range] ; the plot window

Options

 • gradebetweenpoints : boolean ; if true (default), then grade the curve between the user-specified points only instead of over the entire plot view
 • tolerance : numeric value between 0. and 1. ; relative tolerance

Description

 • Grade the functions specified in parameter ref, using the candidate user responses in parameter response. Note that the order of the items in response do not have to match the order of the items in ref.
 • Each element in ref or response is one of the following objects: LinearFunction, QuadraticFunction, AbsoluteValueFunction, GridPoint, ExponentialFunction, LogarithmicFunction, Inequalities, Segment.
 • The gradebetweenpoints option, if set to true, causes the response curve, if given as a set of points, to be checked over the x-range of its points instead of over the entire plot range. This is particularly useful in cases where very small errors in the response points could lead to large errors in the curve outside the region of interest. However, if the range of the points is extremely small, it is possible for GradePlot to grade a curve as correct even if it looks incorrect outside the range of the points. It is recommended that response points covering a sufficiently large x-range be provided or the gradebetweenpoints option be set to false if this problem is a concern.
 • The tolerance parameter determines how close the two curves must be to one another for the response to be deemed correct. The closer the value is to zero, the more accurate the response must be to be graded as correct.

Examples

 > $\mathrm{with}\left(\mathrm{Grading}\right):$

Functions can be constructed in different ways.

 > $\mathrm{GradePlot}\left(\mathrm{GridPoint}\left(\left[2.,3.\right]\right),\mathrm{GridPoint}\left(\left[2.02,2.99\right]\right),\left[-5..5,-5..5\right]\right)$
 ${1.}$ (1)
 > $\mathrm{GradePlot}\left(\mathrm{LinearFunction}\left(3x-4\right),\mathrm{LinearFunction}\left(\left[0,-4\right],\left[4,7.97\right]\right),\left[-10..10,-10..10\right]\right)$
 ${1.}$ (2)
 > $\mathrm{GradePlot}\left(\mathrm{LinearFunction}\left(y=3x-4\right),\mathrm{LinearFunction}\left(\left[0.5,-4\right],\left[4,8\right]\right),\left[-10..10,-10..10\right]\right)$
 ${0.}$ (3)
 > $\mathrm{GradePlot}\left(\mathrm{LinearFunction}\left(x=2\right),\mathrm{LinearFunction}\left(\left[2,-1\right],\left[2,5\right]\right),\left[-10..10,-10..10\right]\right)$
 ${1.}$ (4)
 > $\mathrm{GradePlot}\left(\mathrm{QuadraticFunction}\left({x}^{2}-4x+4\right),\mathrm{QuadraticFunction}\left(\left[2,0\right],\left[0,4\right]\right),\left[-10..10,-10..10\right]\right)$
 ${1.}$ (5)
 > $\mathrm{GradePlot}\left(\mathrm{QuadraticFunction}\left({x}^{2}-4x+4\right),\mathrm{QuadraticFunction}\left(\left[2,0.8\right],\left[0,4\right]\right),\left[-10..10,-10..10\right]\right)$
 ${0.}$ (6)
 > $\mathrm{GradePlot}\left(\mathrm{QuadraticFunction}\left({x}^{2}-4x+4\right),\mathrm{LinearFunction}\left(\left[2,0.8\right],\left[0,4\right]\right),\left[-10..10,-10..10\right]\right)$
 ${0.}$ (7)

Lists of functions can be graded. Order does not matter.

 > $\mathrm{GradePlot}\left(\left[\mathrm{LinearFunction}\left(3x-4\right),\mathrm{LinearFunction}\left(x=2\right)\right],\left[\mathrm{LinearFunction}\left(\left[2,-1\right],\left[2,5\right]\right),\mathrm{LinearFunction}\left(\left[0,-4\right],\left[4,8\right]\right)\right],\left[-10..10,-10..10\right]\right)$
 ${1.}$ (8)

Some functions can have restricted domains.

 > $\mathrm{GradePlot}\left(\mathrm{QuadraticFunction}\left({x}^{2},'\mathrm{domain}'=\mathrm{RealRange}\left(\mathrm{Open}\left(5.0\right),\mathrm{\infty }\right)\right),\mathrm{QuadraticFunction}\left(\left[0,0\right],\left[1,1\right]\right),\left[-10..10,-10..10\right]\right)$
 ${0.}$ (9)
 > $\mathrm{GradePlot}\left(\mathrm{QuadraticFunction}\left({x}^{2},'\mathrm{domain}'=\mathrm{RealRange}\left(\mathrm{Open}\left(5.0\right),\mathrm{\infty }\right)\right),\mathrm{QuadraticFunction}\left(\left[0,0\right],\left[1,1\right],'\mathrm{domain}'=\mathrm{RealRange}\left(\mathrm{Open}\left(4.999\right),\mathrm{\infty }\right)\right),\left[-10..10,-10..10\right]\right)$
 ${1.}$ (10)