an>
  <span class="keyword">end</span>
<span class="keyword">catch</span>
<span class="keyword">end</span>

<span class="comment">% Draw useful information</span>
<span class="comment">% plot applied torque</span>
plot([0 force/umax*xmax],[-0.5, -0.5],<span class="string">'g'</span>,<span class="string">'linewidth'</span>,10)
<span class="comment">% plot immediate reward</span>
reward = 1-cost.fcn(cost,[0, 0, theta1, theta2]',zeros(4));
plot([0 reward*xmax],[-0.7, -0.7],<span class="string">'y'</span>,<span