- /
-
Lorenz attractor in 122 characters
on 14 Oct 2022
- 2
- 30
- 4
- 0
- 122
d=0.01;
x=1;
y=1;
z=0;
m=[];
for i=0:1e4
x=x+10*(y-x)*d;
y=y+(28*x-y-x*z)*d;
z=z+(x*y-2.5*z)*d;
m=[m;[x,y,z]];
end
plot3(m(:,1),m(:,2),m(:,3))