概述
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.
最后
以上就是贪玩棒球为你收集整理的Ode45的步长以及RelTol AbsTol的全部内容,希望文章能够帮你解决Ode45的步长以及RelTol AbsTol所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复