%uloha 127 A

fce=@(x,y) x.*(y-1);
Y=euler(fce,1, 1.6, .2,0); %priblizne hodnoty hledane fce pomoci Eulerovy metody

[t,YY]=ode45(fce,[1 1.6],0); %metoda Runge-Kutta

y=dsolve('Dy=x*(y-1)','y(1)=0', 'x');  %presne reseni
y_presne=subs(y,[1:.2:1.6]);

x=[1:.2:1.6]
plot(x,Y,'k',t,YY,'g',x,y_presne,'r')
legend('Euler','Runge-Kutta','dsolve')

