function qdot = dpddpde(q,t)
m1 = 1;
m2 = 1;
L1 = 1;
L2 = 1;
g = 1;

qdot(1) = q(3);
qdot(2) = q(4);
qdot(3) = ((m2*L1*(q(3))^2*sin(q(1)-q(2))*cos(q(1)-q(2)))+(m2*g*sin(q(2))*cos(q(1)-q(2)))-(m2*L2*(q(4))^2*sin(q(1)-q(2)))-((m1+m2)*g*sin(q(1))))/(((m1+m2)*L1)-(m2*L1*(cos(q(1)-q(2)))^2));
qdot(4) = ((-m2*L1*(((m2*L1*(q(3))^2*sin(q(1)-q(2))*cos(q(1)-q(2)))+(m2*g*sin(q(2))*cos(q(1)-q(2)))-(m2*L2*(q(4))^2*sin(q(1)-q(2)))-((m1+m2)*g*sin(q(1))))/(((m1+m2)*L1)-(m2*L1*(cos(q(1)-q(2)))^2)))*cos(q(1)-q(2)))-(m2*L1*(q(3))^2*sin(q(1)-q(2)))-(m2*g*sin(q(2))))/(m2*L2);
endfunction
