Annotation of loncom/homework/templates/Plot_curve.problem, revision 1.5

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.5     ! www        18: <startouttext />What is the amplitude of this function?<endouttext />
1.1       matthew    19: 
1.5     ! www        20: <numericalresponse answer="$amplitude" format="2s">
1.1       matthew    21:     <responseparam name="tol" type="tolerance" description="Numerical Tolerance" default="5%" />
1.5     ! www        22:     
        !            23:     <textline readonly="no" />
        !            24: 
1.1       matthew    25: </numericalresponse>
                     26: </problem>

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