Plotting the output from differential equations
显示 更早的评论
Hello,
I am trying to design a program for making a plot using the outcome from differential equations. I have tried to construct a code several times for this, but I failed. Actually, documents on MathWorks for this issue are very confusing. Would you check my code designed to solve coupled differential equations and let me know what commands are needed to make plots? (Two plots should be generated. One for time vs S_1 the other for time vs S_2.)
I think the basic idea of the program is to save each outcome from given differential equations and use the data for plotting, but I don't know.
(Again, the following code is only for solving differential equations, so additional commands are required to plot data.)
syms S_1(t) S_2(t);
K=1;
k_1=20;
k_2=5;
k_3=5;
k_4=5;
k_5=2;
n=4;
dsolve(diff(S_1,t)==k_1*S_2^n/(K^n+S_2^n)-k_3*S_1-k_5*S_1,S_1(0)==0.0);
dsolve(diff(S_2,t)==k_2+k_5*S_1-k_4*S_2,S_2(0)==0.6);
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Equation Solving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!