%**************************************************************************
%This function calculates the definite integral of y dx.
%It used a cubic spline interpolation to get a dense set of points between
%the measured data points. It then
%does a trapezoidal integration on the denser set of interpolated points.
%The x values are assumed to increase monotonically.
%
%Input:
%x, independent variable
%y, dependent variable
%
%Output:
%int_y_dx_def, integral of y dx
%
%Zack Wolf
%12/18/14

function int_y_dx_def = int_calc_int_def(x, y)

%Find the integral as a function of x
int_y_dx = int_calc_int(x, y);

%Return the final value
int_y_dx_def = int_y_dx(end);
    
%Done
