% Harjutustund 13, ylesanne 4
x=[1:0.5:5];
y=[0,10,18,25,32.2,39,43,48,52.3];
plot(x,y,'o')
pindala=trapz(x,y)

f=@(z) interp1(x,y,z,'spline');
pindalasimpsoniga=integral(f,1,5)