f[t_, y_] := 26*y*(1 - y);
y0 = 0.5; numsteps = 20;
dt = 0.1; t = t0; y = y0;
thelist = List[{t0, y0}];
Do[ k1 = f[t, y]; t = t + dt; yp = y + dt* k1;k2 = f[t, yp];
y = y + 0.05*(k1 + k2);
thelist = Append[thelist, {t, y}];, {i, 1, numsteps} ];
我不断收到错误消息“设置:Do [k1]中的标记时间受保护”。我无法弄清楚原因。