1 view (last 30 days)

I would like to create a graph with time dependent, I have the below code:

S = 10e-6; %amount of streptavidin (μM)

B = 10e-6; %amount of biotin (μM)

S2 = S+B

S3 = S+2*B

S4 = S+3*B

S5 = S+4*B

syms S(t) S2(t) S3(t) S4(t) S5(t)

ode1 = diff(S,t) == (-4*kon*B*S)+koff*S2;

ode2 = diff(S2,t) == -(3*kon*B+koff)*S2+4*kon*B*S+2*koff*S3;

ode3 = diff(S3,t) == -(2*kon*B+2*koff)*S3+3*kon*B*S2+3*koff*S4;

ode4 = diff(S4,t) == -(kon*B+3*koff)*S4+2*kon*B*S3+4*koff*S5;

ode5 = diff(S5,t) == -4*koff*S5+kon*B*S4;

odes = [ode1; ode2; ode3; ode4; ode5]

Aodes = dsolve(odes)

where I tried to use the ode45 function but it seems doesn't work for me or maybe I misunderstand something. And the graph aims to show the value changes of S(t) to S5(t) from 0 to 200 mins.

The concept will be similar to below graph

Star Strider
on 6 Oct 2020

Star Strider
on 7 Oct 2020

Star Strider
on 7 Oct 2020

In certain situations, yes. If you have data for the variables and you want to fit them to a system of differential equations to estimate the parameters, you can certainly estimate the initial conditions as well. (See this Answer where I include them as the last elements of the parameter vector in order to estimate them along with the other parameters.)

Otherwise, MATLAB expects you to supply them, whether you are using the Symbolic Math Toolbox, or one of the numeric ODE solvers (such as ode45 or ode15s).

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 1 Comment

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/606431-graph-plotting-of-ode-with-time-variable#comment_1040336

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/606431-graph-plotting-of-ode-with-time-variable#comment_1040336

Sign in to comment.