% Solve over time interval [0,100] with initial conditions [1,1,1]

% ''f'' is set of differential equations
% ''a'' is array containing x, y, and z variables
% ''t'' is time variable

sigma = 10;
beta = 8/3;
rho = 28;
f = @(t,a) [-sigma*a(1) + sigma*a(2); rho*a(1) - a(2) - a(1)*a(3); -beta*a(3) + a(1)*a(2)];
[t,a] = ode45(f,[0 100],[1 1 1]);     % Runge-Kutta 4th/5th order ODE solver

plot(t,a(:,1))
xlabel('t') 
ylabel('x') 

plot(t,a(:,2))
xlabel('t') 
ylabel('y') 

plot(t,a(:,3))
xlabel('t') 
ylabel('z') 

plot3(a(:,1),a(:,2),a(:,3))
xlabel('x')
ylabel('y')
zlabel('z')