Input undefined in a function describing differential equations
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
I am new at learning how to use the differential equation solvers in MATLAB. I am trying to work out epidemic model differential equations. I got this tutorial online regarding my subject and I tried to use it. The function is given below:
function ypsir =ypsir(t,y)
a = .01;
b = .1;
ypsir(1) =-a*y(1)*y(2);
ypsir(2) = a*y(1)*y(2)-b*y(2);
ypsir(3) = b*y(2);
ypsir = [ypsir(1) ypsir(2) ypsir(3)]';
but when I run it, it keeps on saying input y is undefined. Can someone pls help! Thanks in advance
0 件のコメント
回答 (1 件)
Azzi Abdelmalek
2013 年 5 月 3 日
編集済み: Azzi Abdelmalek
2013 年 5 月 3 日
0 投票
2 件のコメント
Ojaswita
2013 年 5 月 4 日
編集済み: Azzi Abdelmalek
2013 年 5 月 4 日
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!