function animDoublePend(t,y) %Function to animate the pendulum. Input: t and y % from the numerical solution to the pendulum equations. % Length is hard-coded to be 1. [m,n]=size(y); n2=length(t); %Error check on sizes (y should be "tall") if m