如何用matlab求解时滞偏微分方程组
答案:2 悬赏:40
解决时间 2021-03-10 02:33
- 提问者网友:回憶丶初
- 2021-03-09 12:51
如何用matlab求解时滞偏微分方程组
最佳答案
- 二级知识专家网友:闲懒诗人
- 2021-03-09 13:40
这是matlab中dde23的例子,通过这个例子,应该能看懂dde23个参数的作用.直接复制后边的代码就可以输出图形. %DDEX1 Example 1 for DDE23. % This is a simple example of Wille' and Baker that illustrates the % straightforward formulation,computation,and plotting of the solution % of a system of delay differential equations (DDEs). % % The differential equations % % y'_1(t) = y_1(t-1) % y'_2(t) = y_1(t-1)+y_2(t-0.2) % y'_3(t) = y_2(t) % % are solved on [0,5] with history y_1(t) = 1,y_2(t) = 1,y_3(t) = 1 for % t
全部回答
- 1楼网友:放肆的依賴
- 2021-03-09 14:20
使用符号运算工具。
首先定义变量符号
syms s x t;
使用字符串定义公式
eq1 = 'diff(x, t) = 0.11*s*x/(0.06*x+s)';
eq2 = 'diff(s, t) = (-1)*0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03)';
接下来是求解 比如现在要求解s,下面的代码可以给出s的表达式
solution = solve(eq1, eq2, s);
接下来求值
首先给变量赋值
x = 1;
t = 1;
之后运行
result = eval(solution);
可以求出解。
我现在写出的代码可能有错误,不过思路是这样的。我没调试。详细情况可以搜索 matlab 符号运算。
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯
• 手机登qq时,显示手机磁盘不足,清理后重新登 |
• 刺客的套装怎么选啊? |