 2
%   M          (optional) mean of state
%   S          (optional) covariance of state
%
%
% Copyright (C) 2008-2013 by
% Marc Deisenroth, Andrew McHutchon, Joe Hall, and Carl Edward Rasmussen.
%
% Last modified: 2013-03-18


function draw_pendulum(theta, torque, cost, text1, text2, M, S)
%% Code

l = 0.6;
xmin = -1.2*l; 
xmax = 1.2*l;    
umax = 0.5;
height = 0;

% Draw pendulum
pendulum = [0, 0; l*sin(theta), -l*cos(theta)];
clf; hold on
plot(pendulum(:,1), pendulum(:,2),'r','linewidth',4)

% plot ellip