function phaseportret2
    clear;clf;
    tmax=10;
    A=[3,1;4,3];
    eig(A)
    [a,b]=solve('3*x+1*y=0','4*x+3*y=0');
    a=double(a);
    b=double(b);
    x=a-1:0.5:a+1;
    y=b-1:0.5:b+1;
    [X,Y]=meshgrid(x,y); %syzdava 2 matrici. V X sa abcisite na x, a v Y ordinatite na y
    for i=1:length(x)
        for j=1:length(y)
            [T,Z]=ode45(@ff,[0,tmax],[X(i,j),Y(i,j)]);
            [T1,Z1]=ode45(@ff,[0,-tmax],[X(i,j),Y(i,j)]);
            hold on
            plot(Z(:,1),Z(:,2),Z1(:,1),Z1(:,2))
            axis([a-2,a+2,b-2,b+2])
        end
    end
    quiver(X,Y,A(1,1)*X+A(1,2)*Y,A(2,1)*X+A(2,2)*Y)
    function z=ff(t,y)
        z=A*y;
    end
      

end

