%sensitivity.m

clear all
clc

x10=1;
x20=1;
x30=0;
x40=0;
x50=0;
x60=0;
x70=0;
x80=0;

Y0=[x10; x20; x30; x40; x50; x60; x70; x80];

Tfinal=10;
TSPAN=[0 Tfinal];

[T,Y]=ode45('fig_sensitivity_fun',TSPAN,Y0);

figure(1)
plot(T,Y(:,1),'r-',T,Y(:,2),'b-')
legend('x_1','x_2')
xlabel('Time [sec]')
ylabel('States')

figure(2)
plot(T,Y(:,3),'r-',T,Y(:,5),'b-',T,Y(:,7),'m-')
legend('x_3','x_5','x_7')
xlabel('Time [sec]')
ylabel('States')

figure(3)
plot(T,Y(:,4),'r-',T,Y(:,6),'b-',T,Y(:,8),'m-')
legend('x_4','x_6','x_8')
xlabel('Time [sec]')
ylabel('States')

