我想获得R中微分方程系统的3D流场。该系统在代码中。
我已经看到phaseR仅支持一维和二维。
Lorenz<-function(t, state, parameters) {
with(as.list(c(state, parameters)),{
# rate of change
dX <- a*X + Y*Z
dY <- b * (Y-Z)
dZ <- -X*Y + c*Y - Z
# return the rate of change+ list(c(dX, dY, dZ))
}) # end with(as.list ...
}
我希望流场类似于从'phaseR'包中的函数flowfield()
或从'pplane'中的phaseArrows()
获得的流场,但是在3D中,因为系统具有3个变量。