/span>
S          (optional) covariance <span class="string">of</span> <span class="string">state</span>
</pre><p>Copyright (C) 2008-2013 by Marc Deisenroth, Andrew McHutchon, Joe Hall, and Carl Edward Rasmussen.</p><p>Last modified: 2013-03-18</p><pre class="codeinput"><span class="keyword">function</span> draw_pendulum(theta, torque, cost, text1, text2, M, S)
</pre><h2>Code<a name="2"></a></h2><pre class="codeinput">l = 0.6;
xmin = -1.2*l;
xmax = 1.2*l;
umax = 0.5;
height = 0;

<span class="comment">% Dra