% dpdtheta - derivative for function P(theta) in terms of (theta,P(theta)) % Philip D Loewen, 2010-02-24; 2011-03-15 function dpdt = dpdtheta(theta,P) global global_GAMMA g = global_GAMMA; [V,dVdtheta] = vdv(theta); [Q,dQdtheta] = qdq(theta); dpdt = -g * P .* dVdtheta ./ V + (g-1) .* dQdtheta ./ V;