- /
-
Lorenz attractor in 119 characters
on 14 Oct 2022
- 4
- 24
- 2
- 0
- 119
d=.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))