dulum system with reward, applied torque, and predictive uncertainty of the tips of the pendulums</p><pre>  function draw_pendulum(theta, torque, cost, text1, text2, M, S)</pre><p><b>Input arguments:</b></p><pre class="language-matlab">theta1     <span class="string">angle</span> <span class="string">of</span> <span class="string">inner</span> <span class="string">pendulum</span>
theta2     <span class="string">angle</span> <span class="string">of</span> <span class="string">outer</span> <span class="string