function sum=integral(x,y)

% Output type: NUMBER.
% Computes the integral of y with respect to x (by simple summation) and 
% outputs the resulting _number_ (definite integral) rather than the 
% cumulative sum. "integral" outputs the cumulative sum as a vector. 
%currently: uses TRAPZ. 

sum = trapz(x,y); 









