• Remix
  • Share
  • New Entry

  • Muhammad Sinan

  • /
  • Lorenz Attractor in a sphere which gives a behave like a butterfly in a net

on 11 Oct 2021
  • 1
  • 12
  • 0
  • 0
  • 280
clear all; clear; clf;
t = linspace(0, 60, 5000);
f = @(t, x) [10*(x(2)-x(1));
x(1)*(28-x(3))-x(2);
x(1)*x(2)-(8/3)*x(3)];
sol = ode45(f, t, [8,2,1]);
y = deval(t, sol);
figure(1)
plot3(y(1, :), y(2, :), y(3, :), '-r')
hold on
[x, y, z] = sphere;
surf(50*x+10, 50*y+10, 50*z+10, 'facecolor', 'none');
Remix Tree