File:  [LON-CAPA] / loncom / homework / templates / functionplotback.problem
Revision 1.1: download - view: text, annotated - select for diffs
Sat Nov 13 22:30:32 2010 UTC (13 years, 5 months ago) by www
Branches: MAIN
CVS tags: HEAD
More examples
Correction for undefined upper value on boundaries

<problem>
<script type="loncapa/perl">$x=&random(-5,5,2);
$y=&random(-3,3,2);
$a=&random(0.5,0.9,0.1);
if (&random(0,1,1)) {
   $function="$a*(x-($x))^2+($y)";
   $relation='gt';
} else {
   $function="-$a*(x-($x))^2+($y)";
   $relation='lt';
}</script>
<startouttext />
Provide a sketch of the derivative of the indicated function<br /> <endouttext />
<functionplotresponse xaxisvisible="yes" xlabel="x" gridvisible="yes" ylabel="y(x)" id="11" xmax="10" yaxisvisible="yes" xmin="-10" ymin="-10" ymax="10">
<functionplotelements>
<spline initx="-4" inity="0" index="A" order="3" scalex="8" />
<backgroundplot function="$function" fixed="yes" />
</functionplotelements>
<functionplotruleset>
<functionplotrule relationship="eq" xinitial="$x" value="0" derivativeorder="0" percenterror="2" index="extreme" />
<functionplotrule relationship="$relation" xinitiallabel="start" xfinallabel="end" value="0" derivativeorder="1" percenterror="10" index="slope" />
<functionplotrule relationship="eq" xinitiallabel="start" xfinallabel="end" value="0" derivativeorder="2" percenterror="50" index="linear" />
</functionplotruleset>
</functionplotresponse>
</problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>