Annotation of loncom/homework/templates/Plot_curve.problem, revision 1.6
1.1 matthew 1: <problem>
2:
3: <script type="loncapa/perl">
1.5 www 4: $amplitude=&random(0.5,3.5,0.5);
5: $omega=&random(1,2,0.5);
6: $function="$amplitude*sin($omega*x)";
1.1 matthew 7: </script>
8:
1.4 albertel 9: <gnuplot width="300" transparent="off" samples="100" grid="on" font="9" bgcolor="xffffff" height="300" align="left" fgcolor="x000000" border="on" plottype="Cartesian" >
1.1 matthew 10: <axis xmin="-5" ymin="-4" xmax="5" ymax="4" color="x000000" />
11: <xlabel>Label X</xlabel>
12: <ylabel>Label Y</ylabel>
13: <curve linestyle="linespoints" name="My Plot" pointtype="0" color="x000000">
1.5 www 14: <function>$function</function>
1.1 matthew 15: </curve>
16: </gnuplot>
17:
1.6 ! bisitz 18: <startouttext />
! 19: What is the amplitude of this function?
! 20: <endouttext />
1.1 matthew 21:
1.5 www 22: <numericalresponse answer="$amplitude" format="2s">
1.1 matthew 23: <responseparam name="tol" type="tolerance" description="Numerical Tolerance" default="5%" />
1.5 www 24: <textline readonly="no" />
1.6 ! bisitz 25: </numericalresponse>
1.5 www 26:
1.1 matthew 27: </problem>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>