% main_odesim
% m-file script to simulate ordinary differential equation
% reactor model.

global U

% Specify time interval and step length, h.
h=0.001;
t=0:h:0.3 ;
N=length(t);

x0=[2.5;1];                           % Initial state for simulation.
[to,Xo]=ode15s('fx_reactor',t,x0);    % integrate with ode15s solver

figure(1)
subplot(211), plot(to,Xo(:,1)), grid
subplot(212), plot(to,Xo(:,2)), grid

% Linear model
A=jacobi('fx_reactor',0,[2.5;1]);
l=eig(A);
T=-1./l