首页 > 解决方案 > R中的3d流场

问题描述

我想在 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 ...
   }

我期望流场类似于flowfield()从“phaseR”包或“pplane”中获得的流场phaseArrows(),但在 3D 中,因为系统有 3 个变量。

标签: rplotderivative

解决方案


推荐阅读