Personal tools

EOM.m

EOM.m — Objective-C source code, 0Kb

File contents

function dXdt = EOM(t,X)

% GLOBAL VARIABLE DECLARATION
global GAMMA

%%%% STATE VECTOR = X = [theta; phi; thetadot; phidot];
%%%% TIME-DERIVATIVE OF STATE VECTOR (FOR SIMPLIFIED EOMS)
dXdt = zeros(4,1);
dXdt(1) = X(3);
dXdt(2) = X(4);
dXdt(3) = sin(X(1)-GAMMA);
dXdt(4) = dXdt(3)+X(3)^2*sin(X(2))-cos(X(1)-GAMMA)*sin(X(2));


end
Document Actions