% lect12_2: Integration with data points % Generate the data points X = 0:pi/100:pi; Y = sin(X); plot(X, Y, 'o-') % Use trapz to find area under points Q = trapz(X,Y) % Integrate with quad q = quad(@sin, 0, pi)