% Test of integration using table data % This case will use a not-a-knot spline % that gets sent to the integral function. clear close all load intdata2.dat x = intdata2(:,1); y = intdata2(:,2); exact = 1.1064840; % Compute the not-a-knot spline S = spline(x,y); % Estimate integral using the spline sp = integral(@(x)ppval(x,S),x(1),x(end)); rsp = (sp-exact)/exact