%ODE example

%define constant parameters
kon = 10e-4; %s/M
koff = 5e-4; %1/s

%define initial conditions
L0 = 10; %initial concentration of L, M
R0 = 5; %initial concentration of R, M
C0 = 0; %initial concentration of C, M

%create initial condition and parameter matrices
Y0 = [L0 R0 C0];
param = [kon koff];

%set simulation parameters
timeRange = [0 1000]; %s
options = [];

%call the numerical ODE solver
[t,Y] = ode45(@ODEexample_equations, timeRange, Y0, options, param);

%plot the results
plot(t,Y);
legend('L','R','C');
xlabel('time');
ylabel('[Concentration]');
title('R + L <--> C');
