function integral2
d=quad(@vypocet,0,5);
fprintf('Integral z sin2x2 od 0 do 5 je: %.2f\n',d);
x=0:0.01:5;
for n=1:length(x)
    d(n)=quad(@vypocet,0,x(n));
end
plot(x,sin(x.^2).^2,'r',x,d,'c')  
legend('sin^2(x^2)','integral z sin^2(x^2)')
end


function y=vypocet(x)
y=sin(x.^2).^2;
end
