lotvolt = @(mu, rho, nu, sigma)...
    (@(t,x)([x(1).*(mu-nu.*x(2)); x(2).*(-rho + sigma .* x(1))]));
%explanation: This is an anonymous function, which returns an anonymous
%function, where the parameter values are plugged in.
%see homework number 14.

%We solve the ivp by explicit euler:
[T X] = expliciteuler(lotvolt(0.4, 0.2, 0.3, 0.4), [0 100], [1 1], 0.2);

%explicit euler is stupid, but fails instructively.
%For anything else, use a smarter solver, e.g.:
%[T X] = ode45(lotvolt(0.4, 0.2, 0.3, 0.4), [0 100], [1 1]);

%The following shows how to make figures in matlab:
figure;
subplot(2,1,1);
plot(T,X);
xlabel('time');
ylabel('number of critters');
title('Species over time');
legend('x', 'y');

subplot(2,1,2);
plot(X(:,1),X(:,2));
xlabel('x');
ylabel('y');
title('Phase Diagramm');

%if you print out such a figure, you should also write some description
%on it (handwritten is OK.) 
%Example: "we used explicit Euler with stepsize 0.2, integrated for 
%time 100, used the following initial values and parameter values."
