clear
f=@(y)exp(-y^2)*sin(y);
%Simpsoni valem
vastussimpson=quadv(f,0,1)
%trapetsvalemiga
yvork=0:0.0001:1;
g=@(z)exp(-z.^2).*sin(z);
z=g(yvork);
vastustrapets=trapz(yvork,z)