Ode45的步长以及RelTol AbsTol

look here

The stepsize of ode45 is not constant, but chosen such that the error tolerances you prescribe are met. Thus mean step size can only be controlled indirectly by strengthening (-> smaller stepsize) or weakening (-> larger stepsize) the error tolerances RelTol and AbsTol.


look here

RelTol 为相对精度容差,用于控制计算答案中的正确位数。AbsTol 为绝对误差容限,用于控制计算答案与实际解之间的差异。在每个步长中,解分量 i 中的误差 e 将满足

|e(i)| ≤ max(RelTol*abs(y(i)),AbsTol(i))

粗略地讲,这意味着您希望 RelTol 更正所有解分量中的位数(但小于阈值 AbsTol(i) 的解分量除外)。当分量 y(i) 非常小时,即使您对此分量不感兴趣,您仍必须指定足够小的 AbsTol(i) 值,以便获取 y(i) 中的某些正确位数,从而准确计算您更感兴趣的分量。

At each step, the solver estimates the local error e in the ith component of the solution. This error must be less than or equal to the acceptable error, which is a function of the specified relative tolerance, RelTol, and the specified absolute tolerance, AbsTol.
|e(i)| ≤ max(RelTol*abs(y(i)),AbsTol(i))

For relative accuracy, adjust RelTol. For the absolute error tolerance, the scaling of the solution components is important: if |y| is somewhat smaller than AbsTol, the solver is not constrained to obtain any correct digits in y. You might have to solve a problem more than once to discover the scale of solution components.

Roughly speaking, this means that you want RelTol correct digits in all solution components except those smaller than thresholds AbsTol(i). Even if you are not interested in a component y(i) when it is small, you may have to specify AbsTol(i) small enough to get some correct digits in y(i) so that you can accurately compute more interesting components.

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值