找回密码
 注册
查看: 360|回复: 0

R语言 smfsb包 StepEuler()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 10:24:55 | 显示全部楼层 |阅读模式
StepEuler(smfsb)
StepEuler()所属R语言包:smfsb

                                        Create a function for advancing the state of an ODE model by using a simple Euler integration method
                                         为推动国家的ODE模型来创建一个函数,通过使用一个简单的欧拉积分方法

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function creates a function for advancing the state of an ODE model using a simple Euler integration method. The resulting function (closure) can be used in conjunction with other functions (such as simTs) for simulating realisations of ODE models. This function is intended to be pedagogic. See StepODE for a more accurate integration function.
这个函数创建一个函数使用一个简单的欧拉积分方法,为推进国家的ODE模型。可用于结合其他功能(如simTs)ODE模型来模拟实现的功能(关闭)。此功能的目的是教学。 StepODE进行更精确的集成功能。


用法----------Usage----------


StepEuler(RHSfun,dt=0.01)



参数----------Arguments----------

参数:RHSfun
A function representing the RHS of the ODE model. RHSfun should have prototype RHSfun(x,t,...), with  x representing current system state and t representing current system time. The value of the function should be a vector of the same dimension as x, representing the infinitesimal change in state.
RHS的ODE模型的功能。 RHSfun应该有原型RHSfun(x,t,...),与x表示当前系统状态和t表示当前系统时间。值的函数应该是一个矢量的尺寸相同x,表示状态的微小变化。


参数:dt
Time step to be used by the simple Euler integration method. Defaults to 0.01.
简单的欧拉积分方法要使用的时间步长。默认值为0.01。


值----------Value----------


参见----------See Also----------

StepEulerSPN, StepODE, simTs, simSample
StepEulerSPN,StepODE,simTs,simSample


实例----------Examples----------


# Build a RHS for the Lotka-Volterra system[建立一个RHS的Lotka-Volterra系统]
LVrhs <- function(x,t,th=c(c1=1,c2=0.005,c3=0.6))
{
        with(as.list(c(x,th)),{
                c( c1*x1 - c2*x1*x2 ,
                      c2*x1*x2 - c3*x2 )
        })
}
# create a stepping function[创建一个步进功能]
stepLV = StepEuler(LVrhs)
# step the function[加强功能]
print(stepLV(c(x1=50,x2=100),0,1))
# integrate the process and plot it[整合的过程,并绘制]
out = simTs(c(x1=50,x2=100),0,20,0.1,stepLV)
plot(out,plot.type="single",lty=1:2)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-29 07:43 , Processed in 0.022823 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表