Using the Solve command
古いコメントを表示
Equations:
df/dt= 4f(t) - 3f(t)p(t)
dp/dt= -2p(t) + f(t)p(t)
Question: Figure out the critical points of the system, that is, those points (f;p) such that f'=p'=0 simultaneously. If we happen to start at one of these points, then there's no change since f'= 0 and p'= 0, so the population will just sit there forever. Use the solve command
Code:
[f, p] = dsolve('Df = 4*f - 3*f*p', 'Dp = -2*p + f*p', 'f(0) = 0', 'p(0) = ');
I am getting an error with this: Error in dsolve (line 193) sol = mupadDsolve(args, options);
Error in Project_5_2 (line 5) [f, p] = dsolve('Df = 4*f - 3*f*p', 'Dp = -2*p + f*p', 'f(0) = 0', 'p(0) = ');
2 件のコメント
John D'Errico
2016 年 8 月 15 日
編集済み: John D'Errico
2016 年 8 月 15 日
So, you expect that MATLAB will know that
'p(0) = '
will tell it that p(0) is an unknown, that you wish to solve for? Inventing syntax for existing functions rarely works.
Anyway, you want to use solve here, NOT dsolve.
Torsten
2016 年 8 月 15 日
Why do you use "dsolve" ?
You have two simple algebraic equations to solve, namely
4*x - 3*x*y = 0
-2*y + x*y = 0
Best wishes
Torsten.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!