Skip to content

Instantly share code, notes, and snippets.

@jdelacruz26
Last active February 19, 2018 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdelacruz26/245e46c3c2dab8800df1eb7abef922c1 to your computer and use it in GitHub Desktop.
Save jdelacruz26/245e46c3c2dab8800df1eb7abef922c1 to your computer and use it in GitHub Desktop.
function yp=derivada(t,y)
global L m P k c
yp(1,1)=y(3);
yp(2,1)=y(4);
% yp(3,1)=(-(P*L-(3/2)*k)*y(2)-(k-P*L)*y(1))*(12/(25*m*L^2));
% yp(4,1)=(-k*y(2)-0.5*m*L^2*yp(3))*3/(m*L^2);
yp(3,1)=(-(P*L-(3/2)*k)*y(2)-(k-P*L)*y(1)-c*y(3)-(3/2)*c*y(4))*(12/(25*m*L^2));
yp(4,1)=(-k*y(2)-0.5*m*L^2*yp(3)-c*y(4))*3/(m*L^2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment