Lorenz Attractor

4 ビュー (過去 30 日間)
James Hendren
James Hendren 2012 年 3 月 19 日
回答済み: ANTONINO BIANCUZZO 2022 年 3 月 19 日
Does anyone have a script written to solve lorenz attractors and them graph them? If so could you send the script to me please?

回答 (1 件)

ANTONINO BIANCUZZO
ANTONINO BIANCUZZO 2022 年 3 月 19 日
clear all, close all, clc
Beta = [10; 28; 8/3]; % chaotic values
x0 = [0; 1; 20]; % initial condition
dt = 0.001;
tspan = dt:dt:50; % 50.000 time span
%% ode options
options = odeset('RelTol',1e-12,'AbsTol',1e-12*ones(1,3));
[t,x] = ode45(@(t,x)lorenz(t,x,Beta),tspan,x0,options);
%% lorenz plot
plot3(x(:,1),x(:,2),x(:,3));
function dx = lorenz(t,x,Beta)
%% Lorenz equations
dx = [
Beta(1)*(x(2)-x(1));
x(1)*(Beta(2)-x(3)) - x(2);
x(1)*x(2) - Beta(3)*x(3);
];

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by