function integral2
h=quad(@vypocet2,0,2*pi);
fprintf('Integral z sin2x2 od 0 do 2*pi: %.2f\n',h);
h=quad(@vypocet2,0,5);
fprintf('Integral z sin2x2 od 0 do 5: %.2f\n',h);
x=0:0.01:5;
for  n=1:length(x)
    ch(n)=quad(@vypocet2,0,x(n));
end
plot(x,vypocet2(x),x,ch)
legend('sin^2x^2','integral z sin^2x^2')
end
function y=vypocet2(x)
y=sin(x.^2).^2;
end

