% Tund 13, ülesanne 4
x=[1:0.5:5];
y=[0,10,18,25,32.2,39,43,48,52.3];
plot(x,y,'o')
hold on
pindala1=trapz(x,y)
xvork=[1:0.001:5];
y3splain=interp1(x,y,xvork,'spline');
plot(xvork,y3splain,'g-')
f=@(z) interp1(x,y,z,'spline');
pindala2=integral(f,1,5)