Calculate the integral of y = f(x) in [a,b] using Riemann Sum

contents of matlab code: intxy.m

% This function is used to calculate the integral of curve(x,y) in the % intveral (a,b)

% Created: 2010-04-14

function sum = intxy(x,y,a,b)

x_itvl = x(x>=a&x<=b); y_itvl = y(x>=a&x<=b);

x_diff = x_itvl(2:end)-x_itvl(1:end-1); sum = 0.5*x_diff*(y_itvl(1:end-1)' + y_itvl(2:end)');



Create Triangle distributed variables

[1]



Find all intersections of curves

[2]

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett