clear global sigma r b sigma=input(' Give sigma: '); r=input(' Give r: '); b=input(' Give b: '); tmax=input(' Given time till end of integration: '); dt=input(' Give time between outputs: '); tspan=0:dt:tmax; yinit=input(' Give initial values of x,y,z as column vector: '); [t,y]=ode45('rhslorenz',tspan,yinit); % Solve ODEs figure(1) set(1,'Position', [100 200 800 620]); % Default plotting window is too small plot(t,y) xlabel('t');ylabel('y1,y2,y3'); title('Time evolution: x (blue), y(green), z (red)') figure(2) set(2,'Position', [450 75 400 720]); % Default plotting window is wrong shape subplot(3,1,1),plot(y(:,1),y(:,2)) xlabel('x');ylabel('y'); title('y versus x projection') subplot(3,1,2),plot(y(:,1),y(:,3)) % Do multiple plots on one figure xlabel('x');ylabel('z'); title('z versus x projection') subplot(3,1,3),plot(y(:,2),y(:,3)) xlabel('y');ylabel('z'); title('z versus y projection')