我正在研究涉及微分方程的数学模型。所以我在 R 中使用了 desolve 库包。我收到如下所示的错误。 图书馆(“解开”);
<块引用>setwd("F:/Rfile"); source("F:\Rfile\ode1a.R")
Lambda_h=0.041; psi_h=5.5e-05; psi_v=0.13; sigma_v=0.33; sigma_h=4.3; beta_hv=0.022; beta_vh=0.24; beta_vhb=0.024; nu_h=0.10; nu_v=0.083; 伽玛_h=0.0035; delta_h=01.8e-05; rho_h=2.7e-03; mu_1h=8.8e-06; mu_2h=2.0e-07; mu_1v=0.033; mu_2v=4.0e-05;
t0 = 0; tf = 10000; tout = seq(from = t0, t0 = tf, by = 250); 警告信息: 在 seq.default(from = t0, t0 = tf, by = 250) 中: 额外的参数‘t0’将被忽略
ncase=1; u0=代表(0,7); if(ncase==1){
u0[1]=600;
u0[2]=20;
u0[3]=3;
u0[4]=0;
u0[5]=2400;
u0[6]=30;
u0[7]=5;
}
<块引用>if(ncase==2){
u0[1]=481.6;
u0[2]=1.7;
ncall=0;
out=lsodes(y=u0,times=tout,func=ode1a,sparsetype=”sparseint”, rtol=1e-6, atol=1e-6,maxord=5); checkInput(y, times, func, rtol, atol, jacvec, tcrit, hmin, hmax, 中的错误: `hmax' 必须是非负值 另外: 警告信息: 在 max(abs(diff(times))) 中:没有非缺失的 max 参数;返回 -Inf