How to plot points from odefun
古いコメントを表示
Hi, so I'm using odefun and ode45 to graph 3 different functions, but additionally I would like to graph specifically some points at several x values (50, 100,150, 200), but since I´m using odefun I don't know how to incorporate it. This is my code:
odefun function:
function yp = odefun(~,y)
yp = zeros(3,1);
yp(1)= (0.48947553*y(1))+(-0.2217926*y(1)*y(2))+(-0.8924614*y(3)*y(1));
yp(2)= (-0.0528409*y(2))+(0.00087705*y(1)*y(2));
yp(3)= (-0.0990983*y(3))+(0.00461634*y(1)*y(3));
ode code:
t0 = 0;
tfinal = 200;
y0 = [60.275818; 2.043051; 0.033794];
[T,Y] = ode45(@odefun,[t0 tfinal],y0);
figure;
plot(T,Y)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!