s = 10;
b = 8/3;
r = 28;

function [f] = Lorenz(t,X)
    x = X(1)
    y = X(2)
    z = X(3)
    f(1) = s*(y-x)
    f(2) = r*x-y-x*z
    f(3) = x*y-b*z
    f = [f(1);f(2);f(3)]
endfunction

dt = 0.01;
Tf = 200;
t = 0:dt:Tf;

X0 = [0.1;0.1;-0.1];

[u] = ode(X0,0,t,Lorenz)
subplot(121)
param3d(u(1,:),u(2,:),u(3,:),35,45,"X@Y@Z",[2,4])
subplot(122)
plot(t,u(1,:))

 
