Here is my code, it works and the graph is correct. However, i am having trouble answering one of my questions about this code. I need to find the CB and CS values at t=5, as well as i need to find the t and CB values when CS = 0.001. I cannot figure out the codes to find those answers.
t = [0 50]; %time interval
Y0 = [0.05 5]; % initial values
[tout, Yout] = ode15s(@func20,t,Y0)
plot(tout,Yout)
xlabel('t')
ylabel('C')
legend('CB','CS')
title('HW 10 - Part4 ODE15s')
function dy = func20(t,x)
Kr = 0.30000;
K = 0.00300;
CB = x(1);
CS = x(2);
dy = zeros(2,1);
dy(1) = ((Kr)*(x(1))*(x(2)))/(K+x(2));
dy(2) = ((-0.75)*(Kr)*(x(1))*(x(2)))/(K+x(2));
end