%exercise 1 solution %define constant parameters k1on = 20e-4; k1off = 10e-4; k2on = 10e-4; k2off = 5e-4; k3off = 1e-3; %define initial conditions L0 = 10; %initial concentration of L R0 = 5; %initial concentration of R Rstar0 = 0; %initial concentration of R* C0 = 0; %initial concentration of C %create initial condition and parameter matrices Y0 = [L0 R0 Rstar0 C0]; param = [k1on k1off k2on k2off k3off]; %set simulation parameters timeRange = [0 1000]; options = []; %call the numerical ODE solver [t,Y] = ode45(@ex1_equations, timeRange, Y0, options, param); %plot the results plot(t,Y); legend('L','R','Rstar','C'); xlabel('time'); ylabel('[Concentration]'); title('example one solution');