File:
[LON-CAPA] /
loncom /
homework /
templates /
functionplotone.problem
Revision
1.4:
download - view:
text,
annotated -
select for diffs
Wed Nov 24 02:53:18 2010 UTC (14 years, 1 month ago) by
www
Branches:
MAIN
CVS tags:
version_2_12_X,
version_2_11_X,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
loncapaMITrelate_1,
loncapaMITrelate,
language_hyphenation_merge,
language_hyphenation,
HEAD,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse,
BZ4492-feature_Support_horizontal_radioresponse,
BZ4492-Support_horizontal_radioresponse
Show answer functionality
<problem>
<script type="loncapa/perl">$maxacc=&random(3,5,1);
$maxbraketime=&random(6,10,2);
$wait=&random(2,4,1);</script>
<startouttext />
At t=0 s, a car cruises at a constant positive velocity. Suddenly, a light switches to red. At t=$maxbraketime s, the driver is maximum on the brake. The car then stops in front of the red light for over $wait seconds. Eventually, it drives off, and then again cruises at a constant velocity. The car cannot accelerate with more than $maxacc m/s<sup>2</sup>.<br />
Provide a graph of its acceleration as a function of time.<br /> <endouttext />
<functionplotresponse xaxisvisible="yes" xlabel="t [s]" gridvisible="yes" ylabel="a(t) [m/s^2]" id="11" xmax="30" yaxisvisible="yes" xmin="-4" ymin="-8" ymax="8" answerdisplay="0::$maxbraketime-4,-7*(exp(-0.5*(x-$maxbraketime)^2)-exp(-8)):$maxbraketime-4:$maxbraketime+4,0:$maxbraketime+4:$maxbraketime+5+$wait,($maxacc-0.3)*(exp(-(x-($maxbraketime+7+$wait))^2)-exp(-4)):$maxbraketime+5+$wait:$maxbraketime+9+$wait,0:$maxbraketime+9+$wait">
<functionplotelements>
<spline initx="-2" inity="0" index="A" order="8" scalex="28" />
</functionplotelements>
<functionplotruleset>
<functionplotrule relationship="eq" xinitiallabel="start" xfinallabel="brake" value="0" derivativeorder="0" percenterror="1" minimumlength="1" />
<functionplotrule relationship="eq" xinitial="0" value="0" derivativeorder="0" percenterror="1" />
<functionplotrule relationship="lt" xinitiallabel="brake" xfinallabel="stop" value="-0.1" derivativeorder="0" />
<functionplotrule relationship="eq" xinitial="$maxbraketime" value="0" derivativeorder="1" percenterror="40" />
<functionplotrule relationship="eq" xinitiallabel="stop" xfinallabel="driveoff" value="0" derivativeorder="0" percenterror="1" minimumlength="$wait" />
<functionplotrule relationship="gt" xinitiallabel="driveoff" xfinallabel="cruise" value="0.1" derivativeorder="0" />
<functionplotrule relationship="le" xinitiallabel="driveoff" xfinallabel="cruise" value="$maxacc" derivativeorder="0" />
<functionplotrule relationship="eq" xinitiallabel="cruise" xfinallabel="end" value="0" derivativeorder="0" percenterror="1" minimumlength="1" />
</functionplotruleset>
</functionplotresponse>
</problem>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>