我想使用 odeplot 所以逐步得到结果,而不是事后绘制结果。我试过这样写,但我无法让它工作,所以我希望能得到一些帮助。
%Parameters
s = 1;
q = 1;
w = 0.1610;
y0 = [30 1 30]; % Initial values
tspan = [0 10]; % Time 0<t<10
plot=odeset('OutputFcn','odeplot');
[t, y] = ode45(@(t,y) concentration(t, y, s, q, w), plot, tspan, y0);