%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         3. practice         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Nonlinear dynamics systems  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         2019.10.01.         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   Lotka-Volterra systems    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all;

%dynamical systems, the equation draws:
%equations: 
% dx=x*(4-x-2y) 
% dy=y*(6-x-2y)

%parameters:
xb=; %x birth
xd=; %x death
xi=; %y effect on x
yb=; %y birth
yd=; %y death
yi=; %x effect on y

figure;
%borders:
max_pontx=;
max_ponty=;
min_pont=;

%
stepsize=;
x=min_pont:stepsize:max_pontx;%
y=min_pont:stepsize:max_ponty;%
%}

%
% 1.: vector field
% grid generation based on x,y:
[X,Y]=meshgrid(x,y);
% calculate the gradient of the vector field in each grid point
dx=; 
dy=;
l=sqrt(dx.^2+dy.^2);
dx=dx./l; %normalisation
dy=dy./l;
%plot the vector field (quiver function):
quiver(X,Y,dx, dy, 'k');
% calculate the change of x and y in every X,Y grid ponts, and draw a
% vector from it starting from the X,Y point
%}

%2. plot the lines where dx=0 or dy=0
y0=; %xb-xd*x+xi*y=0 line's equation
x0=;%yb-yd*y+yi*x=0 line's equation
hold on; %plot the trajectories on each other
plot(x, y0,'c', zeros(1, length(y)), y, 'c', x0, y, 'g', x, zeros(1, length(x)), 'g'); %plot the lines where dx=0 or dy=0
xlim([-0.1, max_pontx]); %plot borders
ylim([-0.1, max_ponty]);
title(['equations: dx=x*(',num2str(xb),'-',num2str(xd),'*x+',num2str(xi),'*y); dy=y*(',num2str(yb),'-',num2str(yd),'*y+',num2str(yi),'*x)']); %plot title
xlabel('amount of x'); %labels of the axes
ylabel('amount of y');
legend('direction field in given points', ['dx=0 <-  ',num2str(xb),'-',num2str(xd),'*x+',num2str(xi),'*y=0'],'dx=0 <-  x=0', ['dy=0 <-  ',num2str(yb),'-',num2str(yd),'*y+',num2str(yi),'*x=0'], 'dy=0 <-  y=0');

% Plot trajectories:

%3. define initial points for the trajectories
sx=;
sy=;

%
tint=[0 10]; %time interval
%4. calculate the differential equation for every point
for i=1:length(sx) 
      
end

hold off;

