我有一个朱莉娅代码: using DifferentialEquations
using Plots
using ParameterizedFunctions
plotly()
lorenz = @ode_def Lorenz begin
dx = σ*(y-x)
dy = ρ*x-y-x*z
dz = x*y-β*z
end σ = 10. β = 8./
假设我们有以下功能: function f=lorenz(t,x,a,b,c)
% solve differential equation like this
%dx/dt=a*(y-x)
%dy/dt=-x*z+b*x-y
%dz/dt=xy-c*z/3
f=zeros(3,1);% preallocate result
f(1)=a*
的实际代码发布前,让我告诉你,我的电脑的处理器和内存信息是好的: 昨天我已经张贴了关于Lorenz方程(从古典式混沌理论),其中的大好人一个帮助我和展示的解决方案,那就是: function f=lorenz(t,x,a,b,c)
% solve differential equation like this
%dx/dt=a*(y-x)
%dy/dt=-x*z
我试图解决任意n(多变量索引)值的Lane-Emden方程。为了使用SciPy,我将二阶ODE表示为一组两个一阶耦合一阶ODE。我有以下代码: import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint
def poly(y,xi,n):
theta, phi = y