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

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

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

                                        Create a function for advancing the state of an ODE model by using the deSolve package
                                         创建一个函数,推动国家的ODE模型使用的deSolve包

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

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

This function creates a function for advancing the state of an ODE model using an integration method from the deSolve package. The resulting function (closure) can be used in conjunction with other functions (such as simTs) for simulating realisations of ODE models. This function is used similarly to StepEuler, but StepODE should be more accurate and efficient.
这个函数创建一个功能,推进ODE模型的集成方法deSolve包的状态。可用于结合其他功能(如simTs)ODE模型来模拟实现的功能(关闭)。此功能类似于StepEuler,但StepODE应该是更准确,更有效的。


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


StepODE(RHSfun)



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

参数:RHSfun
A function representing the RHS of the ODE model. RHSfun should have prototype RHSfun(x,t,parms,...), with t representing current system time, x representing current system state and parms representing the model parameters. 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,parms,...),与t表示当前系统时间,x表示当前系统状态和parms表示模型的参数。值的函数应该是一个矢量的尺寸相同x,表示状态的微小变化。


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

An R function which can be used to advance the state of the ODE model
R的功能,可用于推进国家的ODE模型


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

StepEulerSPN, StepEuler,
StepEulerSPN,StepEuler,


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


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

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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