% integrates diff eqq for 321 EA sequence, given omega and initial
% conditions for the angles
close all
clc
clear all

omega = [0.01; 0.01; 0.01];%rad/s angular velocity
Y0 = [pi/3; pi/3; pi/4];%rad initial EA


tf = 100; %s 
TSPAN = [0 tf]; %duration of integration in seconds
OPTIONS = odeset('Maxstep', 1);
[TOUT,YOUT] = ode45(@(t,u) EA321diffEq(t, u, 10*sin(t)*omega),TSPAN,Y0,OPTIONS);
plot(TOUT,YOUT*180/pi)
grid on
hold on
xlabel('time [s]'); ylabel('EA [deg]')
legend('\alpha_1', '\alpha_2', '\alpha_3')